@spinnaker/core 0.19.1 → 0.19.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/CHANGELOG.md +8 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/bootstrap/angular.config.ts +0 -3
- package/src/forms/checkmap/checkmap.directive.spec.js +11 -2
- package/src/forms/mapEditor/mapEditor.component.js +15 -13
- package/src/forms/mapEditor/mapEditor.component.spec.js +0 -7
- package/src/pipeline/config/stages/common/stageConfigField/stageConfigField.directive.js +5 -1
- package/src/pipeline/config/stages/common/stageConfigField/stageConfigField.directive.spec.js +0 -7
- package/src/projects/dashboard/cluster/projectCluster.directive.spec.js +0 -7
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinnaker/core",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.2",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@uirouter/react-hybrid": "1.0.2",
|
|
26
26
|
"@uirouter/rx": "0.6.5",
|
|
27
27
|
"@uirouter/visualizer": "7.2.1",
|
|
28
|
-
"angular": "1.
|
|
29
|
-
"angular-messages": "1.
|
|
30
|
-
"angular-sanitize": "1.
|
|
28
|
+
"angular": "1.8.0",
|
|
29
|
+
"angular-messages": "1.8.0",
|
|
30
|
+
"angular-sanitize": "1.8.0",
|
|
31
31
|
"angular-spinner": "1.0.1",
|
|
32
32
|
"angular-ui-bootstrap": "2.5.0",
|
|
33
33
|
"angular-ui-sortable": "0.17.1",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"shx": "0.3.3",
|
|
121
121
|
"typescript": "4.3.5"
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "3ea12b48839ff145c4a602d489507f317b06f856"
|
|
124
124
|
}
|
|
@@ -19,13 +19,10 @@ bootstrapModule.config([
|
|
|
19
19
|
},
|
|
20
20
|
]);
|
|
21
21
|
|
|
22
|
-
// Angular 1.6 defaults preAssignBindingsEnabled to false, reset to true to mimic 1.5 behavior.
|
|
23
|
-
// See https://docs.angularjs.org/guide/migration#migrate1.5to1.6-ng-services-$compile
|
|
24
22
|
bootstrapModule.config([
|
|
25
23
|
'$compileProvider',
|
|
26
24
|
($compileProvider: ICompileProvider) => {
|
|
27
25
|
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|mailto|slack|ssh):/);
|
|
28
|
-
$compileProvider.preAssignBindingsEnabled(true);
|
|
29
26
|
},
|
|
30
27
|
]);
|
|
31
28
|
|
|
@@ -6,15 +6,19 @@ describe('Directives: checkmap', function () {
|
|
|
6
6
|
beforeEach(window.module(require('./checkmap.directive').name));
|
|
7
7
|
|
|
8
8
|
beforeEach(
|
|
9
|
-
window.inject(function ($rootScope, $compile) {
|
|
9
|
+
window.inject(function ($rootScope, $compile, $rootElement, $document) {
|
|
10
10
|
this.scope = $rootScope.$new();
|
|
11
11
|
this.compile = $compile;
|
|
12
|
+
this.rootElement = $rootElement;
|
|
13
|
+
this.document = $document;
|
|
12
14
|
}),
|
|
13
15
|
);
|
|
14
16
|
|
|
15
17
|
it('updates selections when changed', function () {
|
|
16
18
|
var scope = this.scope,
|
|
17
|
-
compile = this.compile
|
|
19
|
+
compile = this.compile,
|
|
20
|
+
rootElement = this.rootElement,
|
|
21
|
+
document = this.document;
|
|
18
22
|
|
|
19
23
|
scope.itemMap = {
|
|
20
24
|
alphabet: ['a', 'b', 'c', 'd'],
|
|
@@ -24,6 +28,11 @@ describe('Directives: checkmap', function () {
|
|
|
24
28
|
|
|
25
29
|
var checkmap = compile('<checkmap item-map="itemMap" selected-items="selectedItems"></checkmap>')(scope);
|
|
26
30
|
|
|
31
|
+
//Angular 1.7 introduced changes to how checkboxes listen to change events. This primarily impacted tests where components which need to be clicked now need to be appended to the document
|
|
32
|
+
// See https://docs.angularjs.org/guide/migration#-input-radio-and-input-checkbox-
|
|
33
|
+
rootElement.append(checkmap);
|
|
34
|
+
document.find('body').append(rootElement);
|
|
35
|
+
|
|
27
36
|
scope.$apply();
|
|
28
37
|
|
|
29
38
|
// Initial state check.
|
|
@@ -28,19 +28,6 @@ angular
|
|
|
28
28
|
function ($scope) {
|
|
29
29
|
this.backingModel = [];
|
|
30
30
|
|
|
31
|
-
// Set default values for optional fields
|
|
32
|
-
this.onChange = this.onChange || angular.noop;
|
|
33
|
-
this.keyLabel = this.keyLabel || 'Key';
|
|
34
|
-
this.valueLabel = this.valueLabel || 'Value';
|
|
35
|
-
this.addButtonLabel = this.addButtonLabel || 'Add Field';
|
|
36
|
-
this.allowEmpty = this.allowEmpty || false;
|
|
37
|
-
this.labelsLeft = this.labelsLeft || false;
|
|
38
|
-
this.tableClass = this.label ? '' : 'no-border-top';
|
|
39
|
-
this.columnCount = this.labelsLeft ? 5 : 3;
|
|
40
|
-
this.model = this.model || {};
|
|
41
|
-
this.isParameterized = isString(this.model);
|
|
42
|
-
this.hiddenKeys = this.hiddenKeys || [];
|
|
43
|
-
|
|
44
31
|
const modelKeys = () => Object.keys(this.model);
|
|
45
32
|
|
|
46
33
|
this.addField = () => {
|
|
@@ -74,7 +61,22 @@ angular
|
|
|
74
61
|
}
|
|
75
62
|
};
|
|
76
63
|
|
|
64
|
+
// In Angular 1.7 Directive bindings were removed in the constructor, default values now must be instantiated within $onInit
|
|
65
|
+
// See https://docs.angularjs.org/guide/migration#-compile- and https://docs.angularjs.org/guide/migration#migrate1.5to1.6-ng-services-$compile
|
|
77
66
|
this.$onInit = () => {
|
|
67
|
+
// Set default values for optional fields
|
|
68
|
+
this.onChange = this.onChange || angular.noop;
|
|
69
|
+
this.keyLabel = this.keyLabel || 'Key';
|
|
70
|
+
this.valueLabel = this.valueLabel || 'Value';
|
|
71
|
+
this.addButtonLabel = this.addButtonLabel || 'Add Field';
|
|
72
|
+
this.allowEmpty = this.allowEmpty || false;
|
|
73
|
+
this.labelsLeft = this.labelsLeft || false;
|
|
74
|
+
this.tableClass = this.label ? '' : 'no-border-top';
|
|
75
|
+
this.columnCount = this.labelsLeft ? 5 : 3;
|
|
76
|
+
this.model = this.model || {};
|
|
77
|
+
this.isParameterized = isString(this.model);
|
|
78
|
+
this.hiddenKeys = this.hiddenKeys || [];
|
|
79
|
+
|
|
78
80
|
if (this.model && !this.isParameterized) {
|
|
79
81
|
modelKeys().forEach((key) => {
|
|
80
82
|
this.backingModel.push({ key: key, value: this.model[key] });
|
|
@@ -5,13 +5,6 @@ describe('Component: mapEditor', function () {
|
|
|
5
5
|
|
|
6
6
|
beforeEach(window.module(require('./mapEditor.component').name));
|
|
7
7
|
|
|
8
|
-
// https://docs.angularjs.org/guide/migration#migrate1.5to1.6-ng-services-$compile
|
|
9
|
-
beforeEach(
|
|
10
|
-
window.module(($compileProvider) => {
|
|
11
|
-
$compileProvider.preAssignBindingsEnabled(true);
|
|
12
|
-
}),
|
|
13
|
-
);
|
|
14
|
-
|
|
15
8
|
beforeEach(
|
|
16
9
|
window.inject(function ($rootScope, $compile) {
|
|
17
10
|
scope = $rootScope.$new();
|
|
@@ -25,7 +25,11 @@ module(CORE_PIPELINE_CONFIG_STAGES_COMMON_STAGECONFIGFIELD_STAGECONFIGFIELD_DIRE
|
|
|
25
25
|
fieldColumns: '@',
|
|
26
26
|
},
|
|
27
27
|
controller: function () {
|
|
28
|
-
|
|
28
|
+
// In Angular 1.7 Directive bindings were removed in the constructor, default values now must be instantiated within $onInit
|
|
29
|
+
// See https://docs.angularjs.org/guide/migration#-compile- and https://docs.angularjs.org/guide/migration#migrate1.5to1.6-ng-services-$compile
|
|
30
|
+
this.$onInit = () => {
|
|
31
|
+
this.fieldColumns = this.fieldColumns || 8;
|
|
32
|
+
};
|
|
29
33
|
},
|
|
30
34
|
};
|
|
31
35
|
});
|
package/src/pipeline/config/stages/common/stageConfigField/stageConfigField.directive.spec.js
CHANGED
|
@@ -9,13 +9,6 @@ describe('Directives: stageConfigField', function () {
|
|
|
9
9
|
|
|
10
10
|
beforeEach(window.module(require('./stageConfigField.directive').name));
|
|
11
11
|
|
|
12
|
-
// https://docs.angularjs.org/guide/migration#migrate1.5to1.6-ng-services-$compile
|
|
13
|
-
beforeEach(
|
|
14
|
-
window.module(($compileProvider) => {
|
|
15
|
-
$compileProvider.preAssignBindingsEnabled(true);
|
|
16
|
-
}),
|
|
17
|
-
);
|
|
18
|
-
|
|
19
12
|
beforeEach(
|
|
20
13
|
window.inject(function ($rootScope, $compile) {
|
|
21
14
|
scope = $rootScope.$new();
|
|
@@ -7,13 +7,6 @@ describe('Directives: projectCluster', function () {
|
|
|
7
7
|
|
|
8
8
|
var $compile, $scope;
|
|
9
9
|
|
|
10
|
-
// https://docs.angularjs.org/guide/migration#migrate1.5to1.6-ng-services-$compile
|
|
11
|
-
beforeEach(
|
|
12
|
-
window.module(($compileProvider) => {
|
|
13
|
-
$compileProvider.preAssignBindingsEnabled(true);
|
|
14
|
-
}),
|
|
15
|
-
);
|
|
16
|
-
|
|
17
10
|
beforeEach(
|
|
18
11
|
window.inject(function ($rootScope, _$compile_) {
|
|
19
12
|
$scope = $rootScope.$new();
|