@arsedizioni/ars-utils 18.2.9 → 18.2.11
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/clipper.common/common/definitions.d.ts +53 -2
- package/clipper.common/common/messages.d.ts +5 -0
- package/clipper.common/common/services/clipper.service.d.ts +13 -3
- package/clipper.ui/ui/document-manager/document-manager.d.ts +1 -1
- package/clipper.ui/ui/search-dialog/search-dialog.component.d.ts +2 -2
- package/core/definitions.d.ts +2 -2
- package/core/selectable.d.ts +4 -4
- package/core/services/broadcast.service.d.ts +3 -7
- package/core/services/screen.service.d.ts +0 -12
- package/esm2022/clipper.common/common/definitions.mjs +14 -5
- package/esm2022/clipper.common/common/messages.mjs +8 -2
- package/esm2022/clipper.common/common/services/clipper.service.mjs +17 -3
- package/esm2022/clipper.ui/ui/document-manager/document-manager.mjs +1 -1
- package/esm2022/clipper.ui/ui/search-dialog/search-dialog.component.mjs +1 -1
- package/esm2022/core/definitions.mjs +1 -1
- package/esm2022/core/selectable.mjs +28 -16
- package/esm2022/core/services/broadcast.service.mjs +1 -7
- package/esm2022/core/services/screen.service.mjs +3 -25
- package/esm2022/support.common/common/definitions.mjs +1 -1
- package/esm2022/support.common/common/services/support.service.mjs +2 -2
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +37 -8
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +30 -45
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/package.json +12 -12
- package/support.common/common/definitions.d.ts +25 -0
- package/support.common/common/services/support.service.d.ts +2 -2
|
@@ -1654,8 +1654,9 @@ class SelectableModel {
|
|
|
1654
1654
|
*/
|
|
1655
1655
|
updateCurrent(item, lookupValue) {
|
|
1656
1656
|
const p = SystemUtils.arrayFindIndexByKey(this._all, this._lookupFieldName, lookupValue);
|
|
1657
|
-
if (p != -1)
|
|
1657
|
+
if (p != -1) {
|
|
1658
1658
|
this._current.toggle(item);
|
|
1659
|
+
}
|
|
1659
1660
|
}
|
|
1660
1661
|
/**
|
|
1661
1662
|
* Select an item
|
|
@@ -1663,12 +1664,16 @@ class SelectableModel {
|
|
|
1663
1664
|
* @param lookupValue : the value
|
|
1664
1665
|
*/
|
|
1665
1666
|
toggle(item, lookupValue) {
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1667
|
+
if (lookupValue) {
|
|
1668
|
+
const p = SystemUtils.arrayFindIndexByKey(this._all, this._lookupFieldName, lookupValue);
|
|
1669
|
+
if (p == -1) {
|
|
1670
|
+
this._all.push(item);
|
|
1671
|
+
}
|
|
1672
|
+
else {
|
|
1673
|
+
this._all.splice(p, 1);
|
|
1674
|
+
}
|
|
1675
|
+
this._current.toggle(item);
|
|
1676
|
+
}
|
|
1672
1677
|
}
|
|
1673
1678
|
/**
|
|
1674
1679
|
* Select an item
|
|
@@ -1676,10 +1681,15 @@ class SelectableModel {
|
|
|
1676
1681
|
* @param lookupValue : the value
|
|
1677
1682
|
*/
|
|
1678
1683
|
select(item, lookupValue) {
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1684
|
+
if (lookupValue) {
|
|
1685
|
+
const p = SystemUtils.arrayFindIndexByKey(this._all, this._lookupFieldName, lookupValue);
|
|
1686
|
+
if (p == -1) {
|
|
1687
|
+
this._all.push(item);
|
|
1688
|
+
}
|
|
1689
|
+
else {
|
|
1690
|
+
this._current.select(item);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1683
1693
|
}
|
|
1684
1694
|
/**
|
|
1685
1695
|
* Deselect an item
|
|
@@ -1687,10 +1697,12 @@ class SelectableModel {
|
|
|
1687
1697
|
* @param lookupValue : the value
|
|
1688
1698
|
*/
|
|
1689
1699
|
deselect(item, lookupValue) {
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1700
|
+
if (lookupValue) {
|
|
1701
|
+
const p = SystemUtils.arrayFindIndexByKey(this._all, this._lookupFieldName, lookupValue);
|
|
1702
|
+
if (p != -1) {
|
|
1703
|
+
this._all.splice(p, 1);
|
|
1704
|
+
this._current.deselect(item);
|
|
1705
|
+
}
|
|
1694
1706
|
}
|
|
1695
1707
|
}
|
|
1696
1708
|
/**
|
|
@@ -1759,12 +1771,6 @@ class BroadcastService {
|
|
|
1759
1771
|
this.subject.next({ id: id, data: data });
|
|
1760
1772
|
}, delay);
|
|
1761
1773
|
}
|
|
1762
|
-
/**
|
|
1763
|
-
* Clear
|
|
1764
|
-
*/
|
|
1765
|
-
clearMessage() {
|
|
1766
|
-
this.subject.next(0);
|
|
1767
|
-
}
|
|
1768
1774
|
/**
|
|
1769
1775
|
* Get the next message as observable
|
|
1770
1776
|
* @returns : the observable object
|
|
@@ -1809,35 +1815,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImpor
|
|
|
1809
1815
|
}]
|
|
1810
1816
|
}] });
|
|
1811
1817
|
|
|
1812
|
-
const ScreenMessages = {
|
|
1813
|
-
NAVIGATOR_SIZE_CHANGED: '§navigator-size-changed',
|
|
1814
|
-
};
|
|
1815
1818
|
class ScreenService {
|
|
1816
|
-
get mq() {
|
|
1817
|
-
return this._mq;
|
|
1818
|
-
}
|
|
1819
|
-
set mq(value) {
|
|
1820
|
-
this._mq = value;
|
|
1821
|
-
}
|
|
1822
|
-
get navigatorHeight() {
|
|
1823
|
-
return this._navigatorHeight;
|
|
1824
|
-
}
|
|
1825
|
-
set navigatorHeight(value) {
|
|
1826
|
-
this._navigatorHeight = value;
|
|
1827
|
-
this.$broadcast.sendMessage(ScreenMessages.NAVIGATOR_SIZE_CHANGED, value);
|
|
1828
|
-
}
|
|
1829
1819
|
get isTouchable() {
|
|
1830
1820
|
return SystemUtils.isTouchable();
|
|
1831
1821
|
}
|
|
1832
1822
|
get isIEOrEdge() {
|
|
1833
1823
|
return /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
1834
1824
|
}
|
|
1835
|
-
|
|
1836
|
-
this.$broadcast = $broadcast;
|
|
1837
|
-
this._mq = '';
|
|
1838
|
-
this._navigatorHeight = 56;
|
|
1839
|
-
}
|
|
1840
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: ScreenService, deps: [{ token: BroadcastService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1825
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: ScreenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1841
1826
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: ScreenService, providedIn: 'root' }); }
|
|
1842
1827
|
}
|
|
1843
1828
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: ScreenService, decorators: [{
|
|
@@ -1845,7 +1830,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImpor
|
|
|
1845
1830
|
args: [{
|
|
1846
1831
|
providedIn: 'root'
|
|
1847
1832
|
}]
|
|
1848
|
-
}]
|
|
1833
|
+
}] });
|
|
1849
1834
|
|
|
1850
1835
|
class ArsDateFnsModule {
|
|
1851
1836
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: ArsDateFnsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -1984,5 +1969,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImpor
|
|
|
1984
1969
|
* Generated bundle index. Do not edit.
|
|
1985
1970
|
*/
|
|
1986
1971
|
|
|
1987
|
-
export { ArsCoreModule, ArsDateFnsModule, AutoFocusDirective, BroadcastService, CopyClipboardDirective, DateFnsAdapter, DateFormat, DateInterval, DateIntervalChangeDirective, DeleteModel, EmailsValidatorDirective, EnvironmentService, EqualsValidatorDirective, FileInfo, FileSizeValidatorDirective, FormatPipe, GroupModel, GuidValidatorDirective, IDModel, ImportModel, MAT_DATE_FNS_FORMATS, NotFutureValidatorDirective, PasswordValidatorDirective, QueryModel, RelationModel, ReplacePipe, SafeHtmlPipe, SafeUrlPipe,
|
|
1972
|
+
export { ArsCoreModule, ArsDateFnsModule, AutoFocusDirective, BroadcastService, CopyClipboardDirective, DateFnsAdapter, DateFormat, DateInterval, DateIntervalChangeDirective, DeleteModel, EmailsValidatorDirective, EnvironmentService, EqualsValidatorDirective, FileInfo, FileSizeValidatorDirective, FormatPipe, GroupModel, GuidValidatorDirective, IDModel, ImportModel, MAT_DATE_FNS_FORMATS, NotFutureValidatorDirective, PasswordValidatorDirective, QueryModel, RelationModel, ReplacePipe, SafeHtmlPipe, SafeUrlPipe, ScreenService, SearchCallbackPipe, SearchFilterPipe, SelectableModel, SqlDateValidatorDirective, SystemUtils, TimeValidatorDirective, UpdateRelationsModel, UrlValidatorDirective, ValidIfDirective, ValidatorDirective, ValueModel };
|
|
1988
1973
|
//# sourceMappingURL=arsedizioni-ars-utils-core.mjs.map
|