@dereekb/dbx-web 13.11.14 → 13.11.16
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/eslint/index.cjs.js +1637 -182
- package/eslint/index.esm.js +1630 -179
- package/eslint/package.json +6 -6
- package/eslint/src/lib/index.d.ts +7 -4
- package/eslint/src/lib/no-redundant-on-destroy.rule.d.ts +1 -1
- package/eslint/src/lib/plugin.d.ts +19 -7
- package/eslint/src/lib/require-clean-subscription.rule.d.ts +1 -1
- package/eslint/src/lib/require-complete-on-destroy.rule.d.ts +1 -1
- package/eslint/src/lib/require-component-config-input.rule.d.ts +50 -0
- package/eslint/src/lib/require-computed-signal-suffix.rule.d.ts +38 -0
- package/eslint/src/lib/require-top-level-computed-signals.rule.d.ts +66 -0
- package/eslint/src/lib/util.d.ts +13 -12
- package/fesm2022/dereekb-dbx-web-calendar.mjs +11 -13
- package/fesm2022/dereekb-dbx-web-calendar.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-mapbox.mjs +16 -12
- package/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web-table.mjs +21 -17
- package/fesm2022/dereekb-dbx-web-table.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-web.mjs +702 -549
- package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
- package/package.json +7 -7
- package/types/dereekb-dbx-web-calendar.d.ts +2 -10
- package/types/dereekb-dbx-web-mapbox.d.ts +5 -5
- package/types/dereekb-dbx-web-table.d.ts +13 -13
- package/types/dereekb-dbx-web.d.ts +419 -334
|
@@ -66,7 +66,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
66
66
|
*
|
|
67
67
|
* The factory initializes each {@link DbxTableDateHeaderComponent} with the column's date metadata.
|
|
68
68
|
*
|
|
69
|
-
* @returns
|
|
69
|
+
* @returns A factory function that maps a date column to its header injection config.
|
|
70
70
|
*/
|
|
71
71
|
function dbxTableDateHeaderInjectionFactory() {
|
|
72
72
|
return (column) => {
|
|
@@ -86,8 +86,8 @@ const NO_GROUPS_ID = 'none';
|
|
|
86
86
|
*
|
|
87
87
|
* Used when no explicit grouping function is provided to the table.
|
|
88
88
|
*
|
|
89
|
-
* @param items -
|
|
90
|
-
* @returns
|
|
89
|
+
* @param items - The array of items to include in the default group.
|
|
90
|
+
* @returns A default group containing all the provided items.
|
|
91
91
|
*/
|
|
92
92
|
function defaultDbxTableItemGroup(items) {
|
|
93
93
|
return {
|
|
@@ -171,12 +171,16 @@ class DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy {
|
|
|
171
171
|
return this._createFiveDayRange(activeDate);
|
|
172
172
|
}
|
|
173
173
|
_createFiveDayRange(date) {
|
|
174
|
+
let result;
|
|
174
175
|
if (date) {
|
|
175
176
|
const start = date;
|
|
176
177
|
const end = this._dateAdapter.addCalendarDays(date, this.dbxTableDateRangeDayDistanceInputCellInputComponent.daysDistance);
|
|
177
|
-
|
|
178
|
+
result = new DateRange(start, end);
|
|
178
179
|
}
|
|
179
|
-
|
|
180
|
+
else {
|
|
181
|
+
result = new DateRange(null, null);
|
|
182
|
+
}
|
|
183
|
+
return result;
|
|
180
184
|
}
|
|
181
185
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
182
186
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTableDateRangeDayDistanceInputCellInputRangeSelectionStrategy });
|
|
@@ -287,8 +291,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
287
291
|
*
|
|
288
292
|
* Initializes the component with the provided configuration for day distance, date bounds, and button format.
|
|
289
293
|
*
|
|
290
|
-
* @param componentConfig -
|
|
291
|
-
* @returns
|
|
294
|
+
* @param componentConfig - Optional configuration for the date range input (day distance, min/max dates, button format)
|
|
295
|
+
* @returns An injection component config that renders a {@link DbxTableDateRangeDayDistanceInputCellInputComponent}
|
|
292
296
|
*/
|
|
293
297
|
function dbxTableDateRangeDayDistanceInputCellInput(componentConfig) {
|
|
294
298
|
const config = {
|
|
@@ -607,7 +611,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
|
|
|
607
611
|
}], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: false }] }] } });
|
|
608
612
|
|
|
609
613
|
class DbxTableItemHeaderComponent extends AbstractDbxTableItemDirective {
|
|
610
|
-
config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => this.item$.pipe(map((x) => (x
|
|
614
|
+
config$ = this.tableStore.viewDelegate$.pipe(switchMap((viewDelegate) => this.item$.pipe(map((x) => (x == null ? undefined : viewDelegate.itemHeader(x))))), maybeValueFromObservableOrValue());
|
|
611
615
|
configSignal = toSignal(this.config$);
|
|
612
616
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: DbxTableItemHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
613
617
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.11", type: DbxTableItemHeaderComponent, isStandalone: true, selector: "dbx-table-item-header", usesInheritance: true, ngImport: i0, template: `
|
|
@@ -632,7 +636,7 @@ class DbxTableItemActionComponent extends AbstractDbxTableItemDirective {
|
|
|
632
636
|
const itemAction = viewDelegate.itemAction;
|
|
633
637
|
let obs = undefined;
|
|
634
638
|
if (itemAction) {
|
|
635
|
-
obs = this.item$.pipe(map((x) => (x
|
|
639
|
+
obs = this.item$.pipe(map((x) => (x == null ? undefined : itemAction(x))));
|
|
636
640
|
}
|
|
637
641
|
return obs;
|
|
638
642
|
}), maybeValueFromObservableOrValue());
|
|
@@ -758,8 +762,8 @@ const DBX_TABLE_ACTIONS_COLUMN_NAME = '_actions';
|
|
|
758
762
|
/**
|
|
759
763
|
* Type guard that checks whether a table view element is a group element (header or footer).
|
|
760
764
|
*
|
|
761
|
-
* @param element -
|
|
762
|
-
* @returns `true` if the element represents a group header or footer row
|
|
765
|
+
* @param element - The table view element to check.
|
|
766
|
+
* @returns `true` if the element represents a group header or footer row.
|
|
763
767
|
*/
|
|
764
768
|
function isDbxTableViewGroupElement(element) {
|
|
765
769
|
return element.type === 'group';
|
|
@@ -767,8 +771,8 @@ function isDbxTableViewGroupElement(element) {
|
|
|
767
771
|
/**
|
|
768
772
|
* Type guard that checks whether a table view element is an item data element.
|
|
769
773
|
*
|
|
770
|
-
* @param element -
|
|
771
|
-
* @returns `true` if the element represents an item data row
|
|
774
|
+
* @param element - The table view element to check.
|
|
775
|
+
* @returns `true` if the element represents an item data row.
|
|
772
776
|
*/
|
|
773
777
|
function isDbxTableViewItemElement(element) {
|
|
774
778
|
return element.type === 'item';
|
|
@@ -793,8 +797,8 @@ class DbxTableViewComponent {
|
|
|
793
797
|
elementsState$ = this.tableStore.groupsState$.pipe(mapLoadingStateValueWithOperator(switchMap((groups) => {
|
|
794
798
|
return this.tableStore.viewDelegate$.pipe(map((viewDelegate) => {
|
|
795
799
|
const { groupHeader: inputGroupHeader, groupFooter: inputGroupFooter } = viewDelegate;
|
|
796
|
-
const hasGroupHeader = inputGroupHeader
|
|
797
|
-
const hasGroupFooter = inputGroupFooter
|
|
800
|
+
const hasGroupHeader = inputGroupHeader == null ? () => false : (group) => inputGroupHeader(group) != null;
|
|
801
|
+
const hasGroupFooter = inputGroupFooter == null ? () => false : (group) => inputGroupFooter(group) != null;
|
|
798
802
|
return groups.flatMap((group) => {
|
|
799
803
|
const { items } = group;
|
|
800
804
|
const itemElements = items.map((item) => ({
|
|
@@ -961,8 +965,8 @@ const DEFAULT_DBX_TABLE_READER_COLUMN_TRACK_BY = (column) => column.columnName;
|
|
|
961
965
|
/**
|
|
962
966
|
* Creates a {@link DbxTableReader} that provides reactive access to cell data across all columns and items in the table.
|
|
963
967
|
*
|
|
964
|
-
* @param config The reader configuration containing the delegate and table store
|
|
965
|
-
* @returns A {@link DbxTableReader} instance with observable accessors for cell data
|
|
968
|
+
* @param config - The reader configuration containing the delegate and table store.
|
|
969
|
+
* @returns A {@link DbxTableReader} instance with observable accessors for cell data.
|
|
966
970
|
*/
|
|
967
971
|
function dbxTableReader(config) {
|
|
968
972
|
const { delegate, tableStore } = config;
|