@sumaris-net/ngx-components 1.19.6 → 1.19.9
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/README.md +7 -7
- package/bundles/sumaris-net.ngx-components.umd.js +73 -18
- package/bundles/sumaris-net.ngx-components.umd.js.map +1 -1
- package/bundles/sumaris-net.ngx-components.umd.min.js +2 -2
- package/bundles/sumaris-net.ngx-components.umd.min.js.map +1 -1
- package/doc/changelog.md +14 -0
- package/esm2015/src/app/core/form/entity-editor.class.js +3 -2
- package/esm2015/src/app/core/services/model/entity.model.js +2 -2
- package/esm2015/src/app/shared/guard/component-dirty.guard.js +3 -3
- package/esm2015/src/app/shared/pipes/form.pipes.js +64 -16
- package/esm2015/src/app/shared/pipes/pipes.module.js +6 -4
- package/fesm2015/sumaris-net.ngx-components.js +71 -19
- package/fesm2015/sumaris-net.ngx-components.js.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/pipes/form.pipes.d.ts +15 -0
- package/sumaris-net.ngx-components.metadata.json +1 -1
package/README.md
CHANGED
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
Based components, for Angular App.
|
|
4
4
|
|
|
5
5
|
Features :
|
|
6
|
-
-
|
|
7
|
-
-
|
|
6
|
+
- Angular v11
|
|
7
|
+
- Angular Material design
|
|
8
|
+
- Ionic framework v5
|
|
8
9
|
- i18n
|
|
9
10
|
- New form field components:
|
|
10
11
|
* Authentication forms
|
|
11
12
|
* Extensible menu
|
|
12
|
-
* UI components :
|
|
13
|
+
* UI components (mobile or desktop) :
|
|
13
14
|
* Autocomplete field, with search and highlight
|
|
14
15
|
* Latitude and longitude field, with 3 entry format
|
|
15
16
|
* Date + time
|
|
16
17
|
|
|
17
18
|
## Contribute
|
|
18
19
|
|
|
19
|
-
See the [developer guide](
|
|
20
|
-
|
|
20
|
+
See the [developer guide](https://github.com/sumaris-net/ngx-sumaris-components/blob/master/doc/build.md)
|
|
21
21
|
|
|
22
22
|
## Change log
|
|
23
23
|
|
|
24
|
-
See the [change log](
|
|
24
|
+
See the [change log](https://github.com/sumaris-net/ngx-sumaris-components/blob/master/doc/changelog.md)
|
|
25
25
|
|
|
26
26
|
## License
|
|
27
27
|
|
|
28
|
-
Free software, distributed under a [AGPL v3 license](
|
|
28
|
+
Free software, distributed under a [AGPL v3 license](https://github.com/sumaris-net/ngx-sumaris-components/blob/master/LICENSE).
|
|
@@ -4756,12 +4756,10 @@
|
|
|
4756
4756
|
};
|
|
4757
4757
|
return FormGetPipe;
|
|
4758
4758
|
}());
|
|
4759
|
-
FormGetPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetPipe_Factory() { return new FormGetPipe(); }, token: FormGetPipe, providedIn: "root" });
|
|
4760
4759
|
FormGetPipe.decorators = [
|
|
4761
4760
|
{ type: i0.Pipe, args: [{
|
|
4762
4761
|
name: 'formGet'
|
|
4763
|
-
},] }
|
|
4764
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
4762
|
+
},] }
|
|
4765
4763
|
];
|
|
4766
4764
|
var FormGetControlPipe = /** @class */ (function () {
|
|
4767
4765
|
function FormGetControlPipe() {
|
|
@@ -4771,12 +4769,10 @@
|
|
|
4771
4769
|
};
|
|
4772
4770
|
return FormGetControlPipe;
|
|
4773
4771
|
}());
|
|
4774
|
-
FormGetControlPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetControlPipe_Factory() { return new FormGetControlPipe(); }, token: FormGetControlPipe, providedIn: "root" });
|
|
4775
4772
|
FormGetControlPipe.decorators = [
|
|
4776
4773
|
{ type: i0.Pipe, args: [{
|
|
4777
4774
|
name: 'formGetControl'
|
|
4778
|
-
},] }
|
|
4779
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
4775
|
+
},] }
|
|
4780
4776
|
];
|
|
4781
4777
|
var FormGetArrayPipe = /** @class */ (function () {
|
|
4782
4778
|
function FormGetArrayPipe() {
|
|
@@ -4786,12 +4782,10 @@
|
|
|
4786
4782
|
};
|
|
4787
4783
|
return FormGetArrayPipe;
|
|
4788
4784
|
}());
|
|
4789
|
-
FormGetArrayPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetArrayPipe_Factory() { return new FormGetArrayPipe(); }, token: FormGetArrayPipe, providedIn: "root" });
|
|
4790
4785
|
FormGetArrayPipe.decorators = [
|
|
4791
4786
|
{ type: i0.Pipe, args: [{
|
|
4792
4787
|
name: 'formGetArray'
|
|
4793
|
-
},] }
|
|
4794
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
4788
|
+
},] }
|
|
4795
4789
|
];
|
|
4796
4790
|
var FormGetGroupPipe = /** @class */ (function () {
|
|
4797
4791
|
function FormGetGroupPipe() {
|
|
@@ -4801,13 +4795,70 @@
|
|
|
4801
4795
|
};
|
|
4802
4796
|
return FormGetGroupPipe;
|
|
4803
4797
|
}());
|
|
4804
|
-
FormGetGroupPipe.ɵprov = i0.ɵɵdefineInjectable({ factory: function FormGetGroupPipe_Factory() { return new FormGetGroupPipe(); }, token: FormGetGroupPipe, providedIn: "root" });
|
|
4805
4798
|
FormGetGroupPipe.decorators = [
|
|
4806
4799
|
{ type: i0.Pipe, args: [{
|
|
4807
4800
|
name: 'formGetGroup'
|
|
4808
|
-
},] }
|
|
4809
|
-
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
4801
|
+
},] }
|
|
4810
4802
|
];
|
|
4803
|
+
var FormGetValuePipe = /** @class */ (function () {
|
|
4804
|
+
function FormGetValuePipe(adapter, _ref) {
|
|
4805
|
+
this.adapter = adapter;
|
|
4806
|
+
this._ref = _ref;
|
|
4807
|
+
this.value = undefined;
|
|
4808
|
+
this._lastControl = null;
|
|
4809
|
+
}
|
|
4810
|
+
FormGetValuePipe.prototype.transform = function (form, path) {
|
|
4811
|
+
var _this = this;
|
|
4812
|
+
if (!form) {
|
|
4813
|
+
this._dispose();
|
|
4814
|
+
return undefined;
|
|
4815
|
+
}
|
|
4816
|
+
// if we ask another time for the same form and opts, return the last value
|
|
4817
|
+
if (form === this._lastControl && equals(path, this._lastPath)) {
|
|
4818
|
+
return this.value;
|
|
4819
|
+
}
|
|
4820
|
+
// store the query, in case it changes
|
|
4821
|
+
this._lastControl = form;
|
|
4822
|
+
// store the params, in case they change
|
|
4823
|
+
this._lastPath = path;
|
|
4824
|
+
// set the value
|
|
4825
|
+
var control = isNotNilOrBlank(path) ? form.get(path) : form;
|
|
4826
|
+
this.value = control === null || control === void 0 ? void 0 : control.value;
|
|
4827
|
+
// if there is a subscription to onLangChange, clean it
|
|
4828
|
+
this._dispose();
|
|
4829
|
+
// subscribe to valueChanges event, in case control value change
|
|
4830
|
+
if (!this._onControlValueChanges && control) {
|
|
4831
|
+
this._onControlValueChanges = control.valueChanges.subscribe(function (value) {
|
|
4832
|
+
_this.value = value;
|
|
4833
|
+
_this._ref.markForCheck();
|
|
4834
|
+
});
|
|
4835
|
+
}
|
|
4836
|
+
return this.value;
|
|
4837
|
+
};
|
|
4838
|
+
FormGetValuePipe.prototype.ngOnDestroy = function () {
|
|
4839
|
+
this._dispose();
|
|
4840
|
+
};
|
|
4841
|
+
/**
|
|
4842
|
+
* Clean any existing subscription to change events
|
|
4843
|
+
*/
|
|
4844
|
+
FormGetValuePipe.prototype._dispose = function () {
|
|
4845
|
+
if (typeof this._onControlValueChanges !== 'undefined') {
|
|
4846
|
+
this._onControlValueChanges.unsubscribe();
|
|
4847
|
+
this._onControlValueChanges = undefined;
|
|
4848
|
+
}
|
|
4849
|
+
};
|
|
4850
|
+
return FormGetValuePipe;
|
|
4851
|
+
}());
|
|
4852
|
+
FormGetValuePipe.decorators = [
|
|
4853
|
+
{ type: i0.Pipe, args: [{
|
|
4854
|
+
name: 'formGetValue',
|
|
4855
|
+
pure: false
|
|
4856
|
+
},] }
|
|
4857
|
+
];
|
|
4858
|
+
FormGetValuePipe.ctorParameters = function () { return [
|
|
4859
|
+
{ type: FormErrorTranslator },
|
|
4860
|
+
{ type: i0.ChangeDetectorRef }
|
|
4861
|
+
]; };
|
|
4811
4862
|
|
|
4812
4863
|
var SharedPipesModule = /** @class */ (function () {
|
|
4813
4864
|
function SharedPipesModule() {
|
|
@@ -4858,7 +4909,8 @@
|
|
|
4858
4909
|
FormGetPipe,
|
|
4859
4910
|
FormGetControlPipe,
|
|
4860
4911
|
FormGetArrayPipe,
|
|
4861
|
-
FormGetGroupPipe
|
|
4912
|
+
FormGetGroupPipe,
|
|
4913
|
+
FormGetValuePipe
|
|
4862
4914
|
],
|
|
4863
4915
|
exports: [
|
|
4864
4916
|
PropertyGetPipe,
|
|
@@ -4897,7 +4949,8 @@
|
|
|
4897
4949
|
FormGetPipe,
|
|
4898
4950
|
FormGetControlPipe,
|
|
4899
4951
|
FormGetArrayPipe,
|
|
4900
|
-
FormGetGroupPipe
|
|
4952
|
+
FormGetGroupPipe,
|
|
4953
|
+
FormGetValuePipe
|
|
4901
4954
|
]
|
|
4902
4955
|
},] }
|
|
4903
4956
|
];
|
|
@@ -11047,7 +11100,7 @@
|
|
|
11047
11100
|
(items || []).forEach(EntityUtils.cleanIdAndUpdateDate);
|
|
11048
11101
|
};
|
|
11049
11102
|
EntityUtils.sort = function (data, sortBy, sortDirection) {
|
|
11050
|
-
if (!data || data.length <= 1)
|
|
11103
|
+
if (!data || data.length <= 1 || !sortBy)
|
|
11051
11104
|
return data;
|
|
11052
11105
|
return data.sort(this.sortComparator(sortBy, sortDirection));
|
|
11053
11106
|
};
|
|
@@ -19518,8 +19571,8 @@
|
|
|
19518
19571
|
return __generator(this, function (_a) {
|
|
19519
19572
|
switch (_a.label) {
|
|
19520
19573
|
case 0:
|
|
19521
|
-
dirty = component.dirty;
|
|
19522
|
-
valid = component.valid;
|
|
19574
|
+
dirty = component === null || component === void 0 ? void 0 : component.dirty;
|
|
19575
|
+
valid = component === null || component === void 0 ? void 0 : component.valid;
|
|
19523
19576
|
can = {
|
|
19524
19577
|
confirmed: !dirty,
|
|
19525
19578
|
save: false,
|
|
@@ -28799,7 +28852,8 @@
|
|
|
28799
28852
|
}, opts));
|
|
28800
28853
|
};
|
|
28801
28854
|
AppEntityEditor.prototype.markForCheck = function () {
|
|
28802
|
-
|
|
28855
|
+
var _a;
|
|
28856
|
+
(_a = this.cd) === null || _a === void 0 ? void 0 : _a.markForCheck();
|
|
28803
28857
|
};
|
|
28804
28858
|
/* -- private functions -- */
|
|
28805
28859
|
/**
|
|
@@ -32007,6 +32061,7 @@
|
|
|
32007
32061
|
exports.FormGetControlPipe = FormGetControlPipe;
|
|
32008
32062
|
exports.FormGetGroupPipe = FormGetGroupPipe;
|
|
32009
32063
|
exports.FormGetPipe = FormGetPipe;
|
|
32064
|
+
exports.FormGetValuePipe = FormGetValuePipe;
|
|
32010
32065
|
exports.Fragments = Fragments$1;
|
|
32011
32066
|
exports.GraphqlService = GraphqlService;
|
|
32012
32067
|
exports.HAMMER_PRESS_TIME = HAMMER_PRESS_TIME;
|