@mediafly/js-ui 50.0.6-0 → 50.0.6-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dropdown-menu/dropdown-menu-action.component.d.ts +1 -1
- package/lib/dropdown-menu/dropdown-menu-action.component.js +4 -4
- package/lib/dropdown-menu/dropdown-menu-action.component.js.map +1 -1
- package/lib/dropdown-menu/dropdown-menu-contents.js +33 -16
- package/lib/dropdown-menu/dropdown-menu-contents.js.map +1 -1
- package/lib/dropdown-menu/dropdown-menu.d.ts +7 -5
- package/lib/dropdown-menu/dropdown-menu.js +49 -16
- package/lib/dropdown-menu/dropdown-menu.js.map +1 -1
- package/lib/modal/modal.service.js +24 -3
- package/lib/modal/modal.service.js.map +1 -1
- package/lib/tsconfig.deploy.tsbuildinfo +11 -10
- package/package.json +1 -1
- package/src/components/dropdown-menu/dropdown-menu-action.component.ts +5 -2
- package/src/components/dropdown-menu/dropdown-menu-contents.ts +15 -19
- package/src/components/dropdown-menu/dropdown-menu.ts +14 -25
- package/src/components/modal/modal.service.ts +7 -9
|
@@ -5,7 +5,6 @@ export default class MflyDropdownMenuAction implements ng.IComponentController {
|
|
|
5
5
|
private $attrs;
|
|
6
6
|
private $element;
|
|
7
7
|
private $rootScope;
|
|
8
|
-
action?: () => void;
|
|
9
8
|
actionHref: string;
|
|
10
9
|
actionHrefTarget: string;
|
|
11
10
|
actionSref: {
|
|
@@ -14,6 +13,7 @@ export default class MflyDropdownMenuAction implements ng.IComponentController {
|
|
|
14
13
|
options: {};
|
|
15
14
|
};
|
|
16
15
|
disable: boolean;
|
|
16
|
+
action?: () => void;
|
|
17
17
|
private parent;
|
|
18
18
|
constructor($attrs: ng.IAttributes, $element: JQuery, $rootScope: JSUIRootScope);
|
|
19
19
|
$onInit(): void;
|
|
@@ -52,10 +52,6 @@ let MflyDropdownMenuAction = class MflyDropdownMenuAction {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
__decorate([
|
|
56
|
-
decorators_1.Output(),
|
|
57
|
-
__metadata("design:type", Function)
|
|
58
|
-
], MflyDropdownMenuAction.prototype, "action", void 0);
|
|
59
55
|
__decorate([
|
|
60
56
|
decorators_1.Input('@'),
|
|
61
57
|
__metadata("design:type", String)
|
|
@@ -72,6 +68,10 @@ __decorate([
|
|
|
72
68
|
decorators_1.Input(),
|
|
73
69
|
__metadata("design:type", Boolean)
|
|
74
70
|
], MflyDropdownMenuAction.prototype, "disable", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
decorators_1.Output(),
|
|
73
|
+
__metadata("design:type", Function)
|
|
74
|
+
], MflyDropdownMenuAction.prototype, "action", void 0);
|
|
75
75
|
MflyDropdownMenuAction = __decorate([
|
|
76
76
|
decorators_1.Component({
|
|
77
77
|
require: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu-action.component.js","sourceRoot":"","sources":["../../src/components/dropdown-menu/dropdown-menu-action.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,8CAAgE;
|
|
1
|
+
{"version":3,"file":"dropdown-menu-action.component.js","sourceRoot":"","sources":["../../src/components/dropdown-menu/dropdown-menu-action.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,8CAAgE;AAYhE,IAAqB,sBAAsB,GAA3C,MAAqB,sBAAsB;IAW1C,YAC2B,MAAsB,EACpB,QAAgB,EACd,UAAyB;QAF7B,WAAM,GAAN,MAAM,CAAgB;QACpB,aAAQ,GAAR,QAAQ,CAAQ;QACd,eAAU,GAAV,UAAU,CAAe;QAuBxD,2CAA2C;QAC3C,qBAAqB;QACrB,aAAQ,GAAG,CAAC,MAAM,EAAE,EAAE;YACrB,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAA;YAC9C,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,EAAE;gBAC/B,IAAI,CAAC,aAAa,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AClB,WAAA,mBAAM,CAAC,YAAY,CAAC,CAAA;;GAdF,sBAAsB,CAwD1C;kBAxDoB,sBAAsB"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
4
13
|
};
|
|
5
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const
|
|
7
|
-
class DropdownMenuContentsController {
|
|
15
|
+
const decorators_1 = require("../decorators");
|
|
16
|
+
let DropdownMenuContentsController = class DropdownMenuContentsController {
|
|
8
17
|
constructor($document, $element, $rootScope, $scope) {
|
|
9
18
|
this.$document = $document;
|
|
10
19
|
this.$element = $element;
|
|
@@ -83,17 +92,25 @@ class DropdownMenuContentsController {
|
|
|
83
92
|
clearPositionalAdjustments(element) {
|
|
84
93
|
element[0].style.removeProperty('transform');
|
|
85
94
|
}
|
|
86
|
-
}
|
|
95
|
+
};
|
|
96
|
+
__decorate([
|
|
97
|
+
decorators_1.Input(),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], DropdownMenuContentsController.prototype, "containerHeight", void 0);
|
|
100
|
+
DropdownMenuContentsController = __decorate([
|
|
101
|
+
decorators_1.Component({
|
|
102
|
+
selector: 'mflyDropdownMenuContents',
|
|
103
|
+
require: {
|
|
104
|
+
mflyDropdownMenu: '^mflyDropdownMenu',
|
|
105
|
+
},
|
|
106
|
+
template: require('./dropdown-menu-contents.html'),
|
|
107
|
+
transclude: true,
|
|
108
|
+
}),
|
|
109
|
+
__param(0, decorators_1.Inject('$document')),
|
|
110
|
+
__param(1, decorators_1.Inject('$element')),
|
|
111
|
+
__param(2, decorators_1.Inject('$rootScope')),
|
|
112
|
+
__param(3, decorators_1.Inject('$scope')),
|
|
113
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object])
|
|
114
|
+
], DropdownMenuContentsController);
|
|
87
115
|
exports.default = DropdownMenuContentsController;
|
|
88
|
-
angular_1.default.module('app').component('mflyDropdownMenuContents', {
|
|
89
|
-
bindings: {
|
|
90
|
-
containerHeight: '<'
|
|
91
|
-
},
|
|
92
|
-
controller: DropdownMenuContentsController,
|
|
93
|
-
require: {
|
|
94
|
-
mflyDropdownMenu: '^mflyDropdownMenu',
|
|
95
|
-
},
|
|
96
|
-
template: require('./dropdown-menu-contents.html'),
|
|
97
|
-
transclude: true
|
|
98
|
-
});
|
|
99
116
|
//# sourceMappingURL=dropdown-menu-contents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu-contents.js","sourceRoot":"","sources":["../../src/components/dropdown-menu/dropdown-menu-contents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dropdown-menu-contents.js","sourceRoot":"","sources":["../../src/components/dropdown-menu/dropdown-menu-contents.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAwD;AAYxD,IAAqB,8BAA8B,GAAnD,MAAqB,8BAA8B;IASlD,YAC8B,SAA8B,EAC/B,QAA6B,EAC3B,UAAyB,EAC7B,MAAiB;QAHd,cAAS,GAAT,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ropdownMenuController implements ng.IComponentController {
|
|
4
4
|
private $element;
|
|
5
5
|
private $timeout;
|
|
6
|
+
isDisabled?: boolean;
|
|
6
7
|
menuStaysOpen?: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
menuTheme?: string;
|
|
9
|
+
pinsTo?: string;
|
|
10
|
+
onOpen?: () => void;
|
|
11
|
+
onToggle: ({ isOpen }: {
|
|
12
|
+
isOpen: boolean;
|
|
13
|
+
}) => void;
|
|
11
14
|
private open;
|
|
12
|
-
private onToggle;
|
|
13
15
|
constructor($element: ng.IAugmentedJQuery, $timeout: ng.ITimeoutService);
|
|
14
16
|
$onChanges(changes: {
|
|
15
17
|
isDisabled: ng.IChangesObject<boolean>;
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
2
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
16
|
};
|
|
5
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const angular_1 = __importDefault(require("angular"));
|
|
7
18
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
-
|
|
19
|
+
const decorators_1 = require("../decorators");
|
|
20
|
+
let DropdownMenuController = class DropdownMenuController {
|
|
9
21
|
constructor($element, $timeout) {
|
|
10
22
|
this.$element = $element;
|
|
11
23
|
this.$timeout = $timeout;
|
|
@@ -58,19 +70,40 @@ class DropdownMenuController {
|
|
|
58
70
|
}
|
|
59
71
|
return !!this.open;
|
|
60
72
|
}
|
|
61
|
-
}
|
|
73
|
+
};
|
|
74
|
+
__decorate([
|
|
75
|
+
decorators_1.Input(),
|
|
76
|
+
__metadata("design:type", Boolean)
|
|
77
|
+
], DropdownMenuController.prototype, "isDisabled", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
decorators_1.Input(),
|
|
80
|
+
__metadata("design:type", Boolean)
|
|
81
|
+
], DropdownMenuController.prototype, "menuStaysOpen", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
decorators_1.Input('@'),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], DropdownMenuController.prototype, "menuTheme", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
decorators_1.Input('@'),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], DropdownMenuController.prototype, "pinsTo", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
decorators_1.Output(),
|
|
92
|
+
__metadata("design:type", Function)
|
|
93
|
+
], DropdownMenuController.prototype, "onOpen", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
decorators_1.Output(),
|
|
96
|
+
__metadata("design:type", Function)
|
|
97
|
+
], DropdownMenuController.prototype, "onToggle", void 0);
|
|
98
|
+
DropdownMenuController = __decorate([
|
|
99
|
+
decorators_1.Component({
|
|
100
|
+
selector: 'mflyDropdownMenu',
|
|
101
|
+
template: require('./dropdown-menu.html'),
|
|
102
|
+
transclude: true,
|
|
103
|
+
}),
|
|
104
|
+
__param(0, decorators_1.Inject('$element')),
|
|
105
|
+
__param(1, decorators_1.Inject('$timeout')),
|
|
106
|
+
__metadata("design:paramtypes", [Object, Function])
|
|
107
|
+
], DropdownMenuController);
|
|
62
108
|
exports.default = DropdownMenuController;
|
|
63
|
-
angular_1.default.module('app').component('mflyDropdownMenu', {
|
|
64
|
-
bindings: {
|
|
65
|
-
isDisabled: '<',
|
|
66
|
-
menuStaysOpen: '<',
|
|
67
|
-
menuTheme: '@',
|
|
68
|
-
pinsTo: '@',
|
|
69
|
-
onOpen: '&',
|
|
70
|
-
onToggle: '&'
|
|
71
|
-
},
|
|
72
|
-
controller: DropdownMenuController,
|
|
73
|
-
template: require('./dropdown-menu.html'),
|
|
74
|
-
transclude: true
|
|
75
|
-
});
|
|
76
109
|
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../src/components/dropdown-menu/dropdown-menu.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../src/components/dropdown-menu/dropdown-menu.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAsB;AACtB,8CAAgE;AAQhE,IAAqB,sBAAsB,GAA3C,MAAqB,sBAAsB;IAW1C,YAC6B,QAA6B,EAC7B,QAA4B;QAD5B,aAAQ,GAAR,QAAQ,CAAqB;QAC7B,aAAQ,GAAR,QAAQ,CAAoB;IACtD,CAAC;IAEJ,UAAU,CAAC,OAAmD;QAC7D,IAAI,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE;YACpC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAA;SAC3F;aAAM;YACN,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI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AI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE;YAEhE,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;SAClC;QAED,IAAI,KAAK,KAAK,SAAS,EAAE;YAExB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAA;SACjB;QAED,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAA;IACnB,CAAC;CACD,CAAA;AAxES;IAAR,kBAAK,EAAE;;0DAAqB;AACpB;IAAR,kBAAK,EAAE;;6DAAwB;AACpB;IAAX,kBAAK,CAAC,GAAG,CAAC;;yDAAmB;AAClB;IAAX,kBAAK,CAAC,GAAG,CAAC;;sDAAgB;AACjB;IAAT,mBAAM,EAAE;;sDAAoB;AACnB;IAAT,mBAAM,EAAE;;wDAAoD;AAPzC,sBAAsB;IAL1C,sBAAS,CAAC;QACV,QAAQ,EAAE,kBAAkB;QAC5B,QAAQ,EAAE,OAAO,CAAC,sBAAsB,CAAC;QACzC,UAAU,EAAE,IAAI;KAChB,CAAC;IAaC,WAAA,mBAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,mBAAM,CAAC,UAAU,CAAC,CAAA;;GAbA,sBAAsB,CA0E1C;kBA1EoB,sBAAsB"}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
2
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
16
|
};
|
|
5
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
18
|
const angular_1 = __importDefault(require("angular"));
|
|
7
19
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
-
|
|
20
|
+
const decorators_1 = require("../decorators");
|
|
21
|
+
let MflyModalService = class MflyModalService {
|
|
9
22
|
constructor($compile, $document, $q, $rootScope, $timeout) {
|
|
10
23
|
this.$compile = $compile;
|
|
11
24
|
this.$document = $document;
|
|
@@ -131,7 +144,15 @@ class MflyModalService {
|
|
|
131
144
|
}
|
|
132
145
|
return `<${lodash_1.default.kebabCase(tagName)}${attributesString}></${lodash_1.default.kebabCase(tagName)}>`;
|
|
133
146
|
}
|
|
134
|
-
}
|
|
147
|
+
};
|
|
148
|
+
MflyModalService = __decorate([
|
|
149
|
+
decorators_1.Injectable('mflyModalService'),
|
|
150
|
+
__param(0, decorators_1.Inject('$compile')),
|
|
151
|
+
__param(1, decorators_1.Inject('$document')),
|
|
152
|
+
__param(2, decorators_1.Inject('$q')),
|
|
153
|
+
__param(3, decorators_1.Inject('$rootScope')),
|
|
154
|
+
__param(4, decorators_1.Inject('$timeout')),
|
|
155
|
+
__metadata("design:paramtypes", [Function, Object, Function, Object, Function])
|
|
156
|
+
], MflyModalService);
|
|
135
157
|
exports.default = MflyModalService;
|
|
136
|
-
angular_1.default.module('app').service('mflyModalService', MflyModalService);
|
|
137
158
|
//# sourceMappingURL=modal.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.service.js","sourceRoot":"","sources":["../../src/components/modal/modal.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal.service.js","sourceRoot":"","sources":["../../src/components/modal/modal.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sDAA6B;AAC7B,oDAAsB;AACtB,8CAAkD;AAclD,IAAqB,gBAAgB,GAArC,MAAqB,gBAAgB;IAIpC,YAC6B,QAA4B,EAC3B,SAA8B,EACrC,EAAgB,EACR,UAAgC,EAClC,QAA4B;QAJ5B,aAAQ,GAAR,QAAQ,CAAoB;QAC3B,cAAS,GAAT,SAAS,CAAqB;QACrC,OAAE,GAAF,EAAE,CAAc;QACR,eAAU,GAAV,UAAU,CAAsB;QAClC,aAAQ,GAAR,QAAQ,CAAoB;IACtD,CAAC;IAEJ;;;;OAIG;IACH,KAAK,CAAC,IAAI,GAAG,EAAE;QACd,IAAI,IAAI,CAAC,YAAY,EAAE;YACtB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YACxC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,CAAA;YAClC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;YAClC,IAAI,CAAC,YAAY,GAAG,SAAS,CAAA;YAC7B,IAAI,CAAC,UAAU,EAAE,CAAA;SACjB;IACF,CAAC;IAED;;OAEG;IACH,OAAO;QACN,IAAI,IAAI,CAAC,YAAY,EAAE;YACtB,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAA;YACnC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,CAAA;YAClC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA;YAClC,IAAI,CAAC,YAAY,GAAG,SAAS,CAAA;YAC7B,IAAI,CAAC,UA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,OAAe,EAAE,WAAe,EAAE;QAE3D,MAAM,UAAU,GAAG,gBAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;YAClD,OAAO,GAAG,gBAAC,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,gBAAC,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAA;QACzD,CAAC,CAAC,CAAA;QAEF,IAAI,gBAAgB,GAAG,EAAE,CAAA;QAEzB,IAAI,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YACpD,gBAAgB,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAA,CAAC,qBAAqB;SACnE;QAED,OAAO,IAAI,gBAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,gBAAgB,MAAM,gBAAC,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAA;IAChF,CAAC;CACD,CAAA;AAxJoB,gBAAgB;IADpC,uBAAU,CAAC,kBAAkB,CAAC;IAM5B,WAAA,mBAAM,CAAC,UAAU,CAAC,CAAA;IAClB,WAAA,mBAAM,CAAC,WAAW,CAAC,CAAA;IACnB,WAAA,mBAAM,CAAC,IAAI,CAAC,CAAA;IACZ,WAAA,mBAAM,CAAC,YAAY,CAAC,CAAA;IACpB,WAAA,mBAAM,CAAC,UAAU,CAAC,CAAA;;GATA,gBAAgB,CAwJpC;kBAxJoB,gBAAgB"}
|
|
@@ -892,17 +892,17 @@
|
|
|
892
892
|
"affectsGlobalScope": false
|
|
893
893
|
},
|
|
894
894
|
"../src/components/dropdown-menu/dropdown-menu.ts": {
|
|
895
|
-
"version": "
|
|
896
|
-
"signature": "
|
|
895
|
+
"version": "3e6c434fb19d09b2606ed800efa72c3daf91706d58986cfbd3ccdb05ca5a0ae6",
|
|
896
|
+
"signature": "97317178aa69587d22239903e3e8d2415b63d56fba3a04aeb57c2043245a2daa",
|
|
897
897
|
"affectsGlobalScope": false
|
|
898
898
|
},
|
|
899
899
|
"../src/components/dropdown-menu/dropdown-menu-action.component.ts": {
|
|
900
|
-
"version": "
|
|
901
|
-
"signature": "
|
|
900
|
+
"version": "7a1e9db2b76d388de2fd92a604a501e335ce082743a58ccdfa02215d0ccc6ad0",
|
|
901
|
+
"signature": "027349dd06f08f2be98943402cad5a856b6ac7a0ded0c4525cf3ebf425fd1ff6",
|
|
902
902
|
"affectsGlobalScope": false
|
|
903
903
|
},
|
|
904
904
|
"../src/components/dropdown-menu/dropdown-menu-contents.ts": {
|
|
905
|
-
"version": "
|
|
905
|
+
"version": "0941d013b8f6020f8a0bd5820e0b4f150876c2d831c544ef73b27138a5de54f0",
|
|
906
906
|
"signature": "e2688a6304181a370cf294d8dc420c4b87433ff7d3c767c1f34936a1715b99d0",
|
|
907
907
|
"affectsGlobalScope": false
|
|
908
908
|
},
|
|
@@ -1162,7 +1162,7 @@
|
|
|
1162
1162
|
"affectsGlobalScope": false
|
|
1163
1163
|
},
|
|
1164
1164
|
"../src/components/modal/modal.service.ts": {
|
|
1165
|
-
"version": "
|
|
1165
|
+
"version": "898890a39f26423572b4aef7973812ac34768f70b671e4b23424112ce5868fb7",
|
|
1166
1166
|
"signature": "284e55e68bbdc7ecf7b9f480277201d87cb27baceb28ad06598b845db42b6d60",
|
|
1167
1167
|
"affectsGlobalScope": false
|
|
1168
1168
|
},
|
|
@@ -3357,7 +3357,7 @@
|
|
|
3357
3357
|
"../src/components/dropdown-menu/dropdown-menu.ts"
|
|
3358
3358
|
],
|
|
3359
3359
|
"../src/components/dropdown-menu/dropdown-menu-contents.ts": [
|
|
3360
|
-
"../
|
|
3360
|
+
"../src/components/decorators/index.ts",
|
|
3361
3361
|
"../src/components/dropdown-menu/dropdown-menu.ts"
|
|
3362
3362
|
],
|
|
3363
3363
|
"../src/components/dropdown-menu/dropdown-menu-header.js": [
|
|
@@ -3380,8 +3380,8 @@
|
|
|
3380
3380
|
"../node_modules/@types/angular/index.d.ts"
|
|
3381
3381
|
],
|
|
3382
3382
|
"../src/components/dropdown-menu/dropdown-menu.ts": [
|
|
3383
|
-
"../node_modules/@types/
|
|
3384
|
-
"../
|
|
3383
|
+
"../node_modules/@types/lodash/index.d.ts",
|
|
3384
|
+
"../src/components/decorators/index.ts"
|
|
3385
3385
|
],
|
|
3386
3386
|
"../src/components/dropdown-menu/index.ts": [
|
|
3387
3387
|
"../src/components/dropdown-menu/dropdown-menu-action.component.ts",
|
|
@@ -3613,7 +3613,8 @@
|
|
|
3613
3613
|
],
|
|
3614
3614
|
"../src/components/modal/modal.service.ts": [
|
|
3615
3615
|
"../node_modules/@types/angular/index.d.ts",
|
|
3616
|
-
"../node_modules/@types/lodash/index.d.ts"
|
|
3616
|
+
"../node_modules/@types/lodash/index.d.ts",
|
|
3617
|
+
"../src/components/decorators/index.ts"
|
|
3617
3618
|
],
|
|
3618
3619
|
"../src/components/on-media-error/index.ts": [
|
|
3619
3620
|
"../src/components/on-media-error/on-media-error.js"
|
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@ import { StateOrName } from '@uirouter/angularjs'
|
|
|
2
2
|
import { Component, Inject, Input, Output } from '../decorators'
|
|
3
3
|
import DropdownMenuController from './dropdown-menu'
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
@Component({
|
|
6
7
|
require: {
|
|
7
8
|
parent: '^mflyDropdownMenu'
|
|
@@ -11,19 +12,21 @@ import DropdownMenuController from './dropdown-menu'
|
|
|
11
12
|
transclude: true
|
|
12
13
|
})
|
|
13
14
|
export default class MflyDropdownMenuAction implements ng.IComponentController {
|
|
14
|
-
|
|
15
|
+
|
|
15
16
|
@Input('@') actionHref!: string
|
|
16
17
|
@Input('@') actionHrefTarget!: string
|
|
17
18
|
@Input() actionSref!: { state: StateOrName, params: {}, options: {} }
|
|
18
19
|
@Input() disable!: boolean
|
|
19
20
|
|
|
21
|
+
@Output() action?: () => void
|
|
22
|
+
|
|
20
23
|
private parent: DropdownMenuController
|
|
21
24
|
|
|
22
25
|
constructor(
|
|
23
26
|
@Inject('$attrs') private $attrs: ng.IAttributes,
|
|
24
27
|
@Inject('$element') private $element: JQuery,
|
|
25
28
|
@Inject('$rootScope') private $rootScope: JSUIRootScope,
|
|
26
|
-
) {
|
|
29
|
+
) {}
|
|
27
30
|
|
|
28
31
|
$onInit() {
|
|
29
32
|
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component, Inject, Input } from '../decorators'
|
|
2
2
|
import DropdownMenuController from './dropdown-menu'
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'mflyDropdownMenuContents',
|
|
7
|
+
require: {
|
|
8
|
+
mflyDropdownMenu: '^mflyDropdownMenu',
|
|
9
|
+
},
|
|
10
|
+
template: require('./dropdown-menu-contents.html'),
|
|
11
|
+
transclude: true,
|
|
12
|
+
})
|
|
5
13
|
export default class DropdownMenuContentsController implements ng.IComponentController {
|
|
6
|
-
|
|
14
|
+
|
|
15
|
+
@Input() containerHeight?: number
|
|
7
16
|
|
|
8
17
|
private deregisterCloseHandler: () => void
|
|
9
18
|
private deregisterOpenHandler: () => void
|
|
@@ -11,10 +20,10 @@ export default class DropdownMenuContentsController implements ng.IComponentCont
|
|
|
11
20
|
private mflyDropdownMenu: DropdownMenuController
|
|
12
21
|
|
|
13
22
|
constructor(
|
|
14
|
-
private $document: ng.IDocumentService,
|
|
15
|
-
private $element: ng.IAugmentedJQuery,
|
|
16
|
-
private $rootScope: JSUIRootScope,
|
|
17
|
-
private $scope: ng.IScope,
|
|
23
|
+
@Inject('$document') private $document: ng.IDocumentService,
|
|
24
|
+
@Inject('$element') private $element: ng.IAugmentedJQuery,
|
|
25
|
+
@Inject('$rootScope') private $rootScope: JSUIRootScope,
|
|
26
|
+
@Inject('$scope') private $scope: ng.IScope,
|
|
18
27
|
) {}
|
|
19
28
|
|
|
20
29
|
$onDestroy() {
|
|
@@ -108,16 +117,3 @@ export default class DropdownMenuContentsController implements ng.IComponentCont
|
|
|
108
117
|
element[0].style.removeProperty('transform')
|
|
109
118
|
}
|
|
110
119
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
angular.module('app').component('mflyDropdownMenuContents', {
|
|
114
|
-
bindings: {
|
|
115
|
-
containerHeight: '<'
|
|
116
|
-
},
|
|
117
|
-
controller: DropdownMenuContentsController,
|
|
118
|
-
require: {
|
|
119
|
-
mflyDropdownMenu: '^mflyDropdownMenu',
|
|
120
|
-
},
|
|
121
|
-
template: require('./dropdown-menu-contents.html'),
|
|
122
|
-
transclude: true
|
|
123
|
-
})
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import angular from 'angular'
|
|
2
1
|
import _ from 'lodash'
|
|
2
|
+
import { Component, Inject, Input, Output } from '../decorators'
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'mflyDropdownMenu',
|
|
7
|
+
template: require('./dropdown-menu.html'),
|
|
8
|
+
transclude: true,
|
|
9
|
+
})
|
|
5
10
|
export default class DropdownMenuController implements ng.IComponentController {
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
@Input() isDisabled?: boolean
|
|
13
|
+
@Input() menuStaysOpen?: boolean
|
|
14
|
+
@Input('@') menuTheme?: string
|
|
15
|
+
@Input('@') pinsTo?: string
|
|
16
|
+
@Output() onOpen?: () => void
|
|
17
|
+
@Output() onToggle: ({ isOpen }: { isOpen: boolean }) => void
|
|
13
18
|
|
|
14
19
|
private open: boolean
|
|
15
|
-
private onToggle: ({ isOpen }: { isOpen: boolean }) => void
|
|
16
20
|
|
|
17
21
|
constructor(
|
|
18
|
-
private $element: ng.IAugmentedJQuery,
|
|
19
|
-
private $timeout: ng.ITimeoutService,
|
|
22
|
+
@Inject('$element') private $element: ng.IAugmentedJQuery,
|
|
23
|
+
@Inject('$timeout') private $timeout: ng.ITimeoutService,
|
|
20
24
|
) {}
|
|
21
25
|
|
|
22
26
|
$onChanges(changes: { isDisabled: ng.IChangesObject<boolean> }) {
|
|
@@ -78,18 +82,3 @@ export default class DropdownMenuController implements ng.IComponentController {
|
|
|
78
82
|
return !!this.open
|
|
79
83
|
}
|
|
80
84
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
angular.module('app').component('mflyDropdownMenu', {
|
|
84
|
-
bindings: {
|
|
85
|
-
isDisabled: '<',
|
|
86
|
-
menuStaysOpen: '<',
|
|
87
|
-
menuTheme: '@',
|
|
88
|
-
pinsTo: '@',
|
|
89
|
-
onOpen: '&',
|
|
90
|
-
onToggle: '&'
|
|
91
|
-
},
|
|
92
|
-
controller: DropdownMenuController,
|
|
93
|
-
template: require('./dropdown-menu.html'),
|
|
94
|
-
transclude: true
|
|
95
|
-
})
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import angular from 'angular'
|
|
2
2
|
import _ from 'lodash'
|
|
3
|
+
import { Inject, Injectable } from '../decorators'
|
|
3
4
|
|
|
4
5
|
interface Modal {
|
|
5
6
|
element: JQuery
|
|
@@ -12,17 +13,17 @@ interface ModalScope extends ng.IScope {
|
|
|
12
13
|
$ctrl?: ng.IController
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
@Injectable('mflyModalService')
|
|
16
17
|
export default class MflyModalService {
|
|
17
18
|
|
|
18
19
|
currentModal: Modal | undefined
|
|
19
20
|
|
|
20
21
|
constructor(
|
|
21
|
-
private $compile: ng.ICompileService,
|
|
22
|
-
private $document: ng.IDocumentService,
|
|
23
|
-
private $q: ng.IQService,
|
|
24
|
-
private $rootScope: ng.IRootScopeService,
|
|
25
|
-
private $timeout: ng.ITimeoutService,
|
|
22
|
+
@Inject('$compile') private $compile: ng.ICompileService,
|
|
23
|
+
@Inject('$document') private $document: ng.IDocumentService,
|
|
24
|
+
@Inject('$q') private $q: ng.IQService,
|
|
25
|
+
@Inject('$rootScope') private $rootScope: ng.IRootScopeService,
|
|
26
|
+
@Inject('$timeout') private $timeout: ng.ITimeoutService,
|
|
26
27
|
) {}
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -166,6 +167,3 @@ export default class MflyModalService {
|
|
|
166
167
|
return `<${_.kebabCase(tagName)}${attributesString}></${_.kebabCase(tagName)}>`
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
angular.module('app').service('mflyModalService', MflyModalService)
|