@piying-lib/angular-daisyui 1.0.19 → 1.0.20
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/extension/index.d.ts +38 -25
- package/fesm2022/piying-lib-angular-daisyui-extension.mjs +109 -38
- package/fesm2022/piying-lib-angular-daisyui-extension.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-field-group.mjs +3 -3
- package/fesm2022/piying-lib-angular-daisyui-field-group.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs +37 -1
- package/fesm2022/piying-lib-angular-daisyui-non-field-control.mjs.map +1 -1
- package/fesm2022/piying-lib-angular-daisyui-service.mjs +1 -47
- package/fesm2022/piying-lib-angular-daisyui-service.mjs.map +1 -1
- package/field-group/index.d.ts +13 -13
- package/non-field-control/index.d.ts +20 -1
- package/package.json +2 -2
- package/preset-css/css/style.css +1 -1
- package/preset-css/css/style.split.css +8 -4
- package/preset-css/json/manifest.json +851 -738
- package/preset-css/ts/accordion.ts +9 -9
- package/preset-css/ts/alert.ts +12 -12
- package/preset-css/ts/avatar.ts +7 -7
- package/preset-css/ts/badge.ts +20 -20
- package/preset-css/ts/breadcrumbs.ts +3 -1
- package/preset-css/ts/browser-mockup.ts +4 -1
- package/preset-css/ts/button.ts +27 -27
- package/preset-css/ts/calendar.ts +5 -1
- package/preset-css/ts/card.ts +15 -15
- package/preset-css/ts/carousel.ts +9 -9
- package/preset-css/ts/chat-bubble.ts +17 -17
- package/preset-css/ts/checkbox.ts +16 -16
- package/preset-css/ts/code-mockup.ts +3 -1
- package/preset-css/ts/collapse.ts +9 -9
- package/preset-css/ts/countdown.ts +3 -1
- package/preset-css/ts/diff.ts +6 -1
- package/preset-css/ts/divider.ts +15 -15
- package/preset-css/ts/dock.ts +10 -10
- package/preset-css/ts/drawer-sidebar.ts +11 -11
- package/preset-css/ts/dropdown.ts +14 -13
- package/preset-css/ts/fab-speed-dial.ts +6 -1
- package/preset-css/ts/fieldset.ts +5 -1
- package/preset-css/ts/file-input.ts +17 -17
- package/preset-css/ts/filter.ts +4 -1
- package/preset-css/ts/footer.ts +7 -7
- package/preset-css/ts/hero.ts +5 -1
- package/preset-css/ts/hover-3-d-card.ts +3 -0
- package/preset-css/ts/hover-gallery.ts +3 -1
- package/preset-css/ts/index.ts +4 -2
- package/preset-css/ts/indicator.ts +10 -10
- package/preset-css/ts/join-group-items.ts +6 -0
- package/preset-css/ts/kbd.ts +8 -1
- package/preset-css/ts/label.ts +4 -1
- package/preset-css/ts/link.ts +12 -12
- package/preset-css/ts/list.ts +6 -1
- package/preset-css/ts/loading.ts +14 -14
- package/preset-css/ts/mask.ts +20 -20
- package/preset-css/ts/menu.ts +17 -17
- package/preset-css/ts/modal.ts +13 -13
- package/preset-css/ts/navbar.ts +6 -1
- package/preset-css/ts/pagination.ts +6 -1
- package/preset-css/ts/phone-mockup.ts +5 -5
- package/preset-css/ts/progress.ts +11 -11
- package/preset-css/ts/radial-progress.ts +3 -1
- package/preset-css/ts/radio.ts +16 -16
- package/preset-css/ts/range-slider.ts +16 -16
- package/preset-css/ts/rating.ts +10 -10
- package/preset-css/ts/select.ts +17 -17
- package/preset-css/ts/skeleton.ts +4 -1
- package/preset-css/ts/stack.ts +7 -1
- package/preset-css/ts/stat.ts +11 -11
- package/preset-css/ts/status.ts +16 -16
- package/preset-css/ts/steps.ts +15 -15
- package/preset-css/ts/swap.ts +9 -9
- package/preset-css/ts/table.ts +11 -11
- package/preset-css/ts/tabs.ts +17 -17
- package/preset-css/ts/text-input.ts +17 -17
- package/preset-css/ts/text-rotate.ts +3 -0
- package/preset-css/ts/textarea.ts +17 -17
- package/preset-css/ts/theme-controller.ts +3 -1
- package/preset-css/ts/timeline.ts +11 -11
- package/preset-css/ts/toast.ts +9 -9
- package/preset-css/ts/toggle.ts +16 -16
- package/preset-css/ts/tooltip.ts +17 -17
- package/preset-css/ts/validator.ts +4 -1
- package/preset-css/ts/window-mockup.ts +3 -1
- package/service/index.d.ts +1 -19
- package/wrapper/index.d.ts +4 -4
package/extension/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { PiyingViewGroupBase, BaseControl, PiyingView } from '@piying/view-angul
|
|
|
10
10
|
import { SelectorlessOutlet } from '@cyia/ngx-common/directive';
|
|
11
11
|
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
12
12
|
import * as rxjs from 'rxjs';
|
|
13
|
+
import { Subject } from 'rxjs';
|
|
13
14
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
14
15
|
|
|
15
16
|
declare const ExactMatchOptions: IsActiveMatchOptions;
|
|
@@ -169,7 +170,7 @@ declare class TableResourceWC {
|
|
|
169
170
|
#private;
|
|
170
171
|
static __version: number;
|
|
171
172
|
templateRef: _angular_core.Signal<unknown>;
|
|
172
|
-
field$$: _angular_core.Signal<
|
|
173
|
+
field$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>;
|
|
173
174
|
props$$: _angular_core.Signal<Record<string, any>>;
|
|
174
175
|
rawData$$: _angular_core.Signal<any>;
|
|
175
176
|
queryParams$$: _angular_core.Signal<any>;
|
|
@@ -185,7 +186,7 @@ declare class SortHeaderWC {
|
|
|
185
186
|
#private;
|
|
186
187
|
static __version: number;
|
|
187
188
|
templateRef: _angular_core.Signal<unknown>;
|
|
188
|
-
field$$: _angular_core.Signal<
|
|
189
|
+
field$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>;
|
|
189
190
|
props$$: _angular_core.Signal<Record<string, any>>;
|
|
190
191
|
key$$: _angular_core.Signal<any>;
|
|
191
192
|
index$: _angular_core.WritableSignal<any>;
|
|
@@ -210,7 +211,7 @@ declare class SortTablehWC {
|
|
|
210
211
|
#private;
|
|
211
212
|
static __version: number;
|
|
212
213
|
templateRef: _angular_core.Signal<unknown>;
|
|
213
|
-
field$$: _angular_core.Signal<
|
|
214
|
+
field$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>;
|
|
214
215
|
props$$: _angular_core.Signal<Record<string, any>>;
|
|
215
216
|
constructor();
|
|
216
217
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SortTablehWC, never>;
|
|
@@ -228,7 +229,7 @@ declare class TableStatusWC {
|
|
|
228
229
|
#private;
|
|
229
230
|
static __version: number;
|
|
230
231
|
templateRef: _angular_core.Signal<unknown>;
|
|
231
|
-
field$$: _angular_core.Signal<
|
|
232
|
+
field$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>;
|
|
232
233
|
constructor();
|
|
233
234
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableStatusWC, never>;
|
|
234
235
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableStatusWC, "app-table-status", never, {}, {}, never, never, true, never>;
|
|
@@ -248,24 +249,13 @@ declare class TableStatusService {
|
|
|
248
249
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TableStatusService>;
|
|
249
250
|
}
|
|
250
251
|
|
|
251
|
-
declare class CheckboxTableWC {
|
|
252
|
-
#private;
|
|
253
|
-
static __version: number;
|
|
254
|
-
templateRef: _angular_core.Signal<unknown>;
|
|
255
|
-
field$$: _angular_core.Signal<_piying_view_angular.PiResolvedViewFieldConfig>;
|
|
256
|
-
props$$: _angular_core.Signal<Record<string, any>>;
|
|
257
|
-
constructor();
|
|
258
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckboxTableWC, never>;
|
|
259
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckboxTableWC, "app-checkbox-table", never, {}, {}, never, never, true, never>;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
252
|
declare class TableCheckboxAllWC {
|
|
263
253
|
#private;
|
|
264
|
-
field$$: _angular_core.Signal<
|
|
254
|
+
field$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>;
|
|
265
255
|
props$$: _angular_core.Signal<Record<string, any>>;
|
|
266
256
|
static __version: number;
|
|
267
257
|
templateRef: _angular_core.Signal<unknown>;
|
|
268
|
-
|
|
258
|
+
constructor();
|
|
269
259
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableCheckboxAllWC, never>;
|
|
270
260
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableCheckboxAllWC, "app-table-checkbox-all", never, {}, {}, never, never, true, never>;
|
|
271
261
|
}
|
|
@@ -274,7 +264,7 @@ declare class TableCheckboxOneWC {
|
|
|
274
264
|
#private;
|
|
275
265
|
static __version: number;
|
|
276
266
|
templateRef: _angular_core.Signal<unknown>;
|
|
277
|
-
field$$: _angular_core.Signal<
|
|
267
|
+
field$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>;
|
|
278
268
|
props$$: _angular_core.Signal<Record<string, any>>;
|
|
279
269
|
constructor();
|
|
280
270
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableCheckboxOneWC, never>;
|
|
@@ -295,7 +285,6 @@ type wrapper_index_d$1_TableStatusWC = TableStatusWC;
|
|
|
295
285
|
declare const wrapper_index_d$1_TableStatusWC: typeof TableStatusWC;
|
|
296
286
|
declare namespace wrapper_index_d$1 {
|
|
297
287
|
export {
|
|
298
|
-
CheckboxTableWC as CheckboxTablehWC,
|
|
299
288
|
wrapper_index_d$1_SortHeaderWC as SortHeaderWC,
|
|
300
289
|
wrapper_index_d$1_SortTablehWC as SortTablehWC,
|
|
301
290
|
wrapper_index_d$1_TableCheckboxAllWC as TableCheckboxAllWC,
|
|
@@ -305,11 +294,36 @@ declare namespace wrapper_index_d$1 {
|
|
|
305
294
|
};
|
|
306
295
|
}
|
|
307
296
|
|
|
297
|
+
type CheckBoxConfig<D> = {
|
|
298
|
+
config: {
|
|
299
|
+
key: string;
|
|
300
|
+
selected?: D[];
|
|
301
|
+
multiple: boolean;
|
|
302
|
+
compareWith?: (o1: D, o2: D) => boolean;
|
|
303
|
+
}[];
|
|
304
|
+
autoDataBind?: boolean;
|
|
305
|
+
dataChangeClear?: boolean;
|
|
306
|
+
};
|
|
307
|
+
declare class CheckboxService<D = any> {
|
|
308
|
+
#private;
|
|
309
|
+
init(define?: CheckBoxConfig<D>): void;
|
|
310
|
+
toggle(key: string | undefined, value: any): void;
|
|
311
|
+
set(key: string | undefined, value: any, selected: boolean): void;
|
|
312
|
+
/** 用来设置一个获得所有列表数据的方法 */
|
|
313
|
+
setAllList(fn: () => D[]): void;
|
|
314
|
+
selectAll(checked: boolean, key?: string): void;
|
|
315
|
+
listenAllSelect(key?: string): Subject<boolean>;
|
|
316
|
+
getSelected(key?: string): D[];
|
|
317
|
+
clear(): void;
|
|
318
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckboxService<any>, never>;
|
|
319
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CheckboxService<any>>;
|
|
320
|
+
}
|
|
321
|
+
|
|
308
322
|
declare class TableExpandOneTableCell {
|
|
309
323
|
#private;
|
|
310
324
|
static __version: number;
|
|
311
325
|
templateRef: _angular_core.Signal<unknown>;
|
|
312
|
-
field$$: _angular_core.Signal<
|
|
326
|
+
field$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>;
|
|
313
327
|
isExpand$$: _angular_core.Signal<boolean>;
|
|
314
328
|
toggle(): void;
|
|
315
329
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableExpandOneTableCell, never>;
|
|
@@ -384,7 +398,7 @@ declare class ListTemplateNFCC {
|
|
|
384
398
|
}, "handle" | "builder">, "fieldGlobalConfig"> & {
|
|
385
399
|
fieldGlobalConfig?: _piying_view_angular.PiViewConfig;
|
|
386
400
|
}> | null;
|
|
387
|
-
field: _angular_core.Signal<
|
|
401
|
+
field: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>;
|
|
388
402
|
templateInput$$: (data: any) => {
|
|
389
403
|
schema: _angular_core.InputSignal<any>;
|
|
390
404
|
options: _angular_core.Signal<{
|
|
@@ -438,7 +452,7 @@ declare class OptionListLocalFilterWC {
|
|
|
438
452
|
fileterOption: {
|
|
439
453
|
type: string;
|
|
440
454
|
};
|
|
441
|
-
field$$: _angular_core.Signal<
|
|
455
|
+
field$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>;
|
|
442
456
|
props$$: _angular_core.Signal<Record<string, any>>;
|
|
443
457
|
constructor();
|
|
444
458
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OptionListLocalFilterWC, never>;
|
|
@@ -461,7 +475,6 @@ type wrapper_index_d_TableStatusWC = TableStatusWC;
|
|
|
461
475
|
declare const wrapper_index_d_TableStatusWC: typeof TableStatusWC;
|
|
462
476
|
declare namespace wrapper_index_d {
|
|
463
477
|
export {
|
|
464
|
-
CheckboxTableWC as CheckboxTablehWC,
|
|
465
478
|
wrapper_index_d_OptionListLocalFilterWC as OptionListLocalFilterWC,
|
|
466
479
|
wrapper_index_d_SortHeaderWC as SortHeaderWC,
|
|
467
480
|
wrapper_index_d_SortTablehWC as SortTablehWC,
|
|
@@ -472,5 +485,5 @@ declare namespace wrapper_index_d {
|
|
|
472
485
|
};
|
|
473
486
|
}
|
|
474
487
|
|
|
475
|
-
export {
|
|
476
|
-
export type { DataResolved, ItemCell, ItemCellBase, NavigationItem, NavigationMode, NavigationPosition, TableItemDefine2 };
|
|
488
|
+
export { CheckboxService, ExactMatchOptions, ExpandRowDirective, component_index_d as ExtComponentGroup, wrapper_index_d as ExtWrapperGroup, ListTemplateNFCC, MenuTreeNFCC, OptionListFCC, OptionListLocalFilterWC, PaginationNFCC, PickerRefFCC, SortHeaderWC, SortTablehWC, SubsetMatchOptions, TableCheckboxAllWC, TableCheckboxOneWC, TableExpandOneTableCell, TableNFCC, TableResourceWC, TableRowFGC, TableStatusService, TableStatusWC, wrapper_index_d$1 as WrapperGroup, createDefaultColDefine, createDefaultColDefineFn, createRowDefine, inputSortDirective };
|
|
489
|
+
export type { CheckBoxConfig, DataResolved, ItemCell, ItemCellBase, NavigationItem, NavigationMode, NavigationPosition, TableItemDefine2 };
|
|
@@ -3,7 +3,7 @@ import * as i0 from '@angular/core';
|
|
|
3
3
|
import { viewChild, input, inject, computed, Component, model, InjectionToken, Injector, untracked, signal, Injectable, HostListener, Directive, effect, resource, ElementRef, linkedSignal, NgZone, EventEmitter, TemplateRef, ViewContainerRef, Output, forwardRef, ChangeDetectionStrategy } from '@angular/core';
|
|
4
4
|
import { StrOrTemplateComponent, isSchema, computedWithPrev, DefaultOptionConvert, transformOption } from '@piying-lib/angular-core';
|
|
5
5
|
import { CssPrefixPipe, MergeClassPipe, TwPrefixPipe } from '@piying-lib/angular-daisyui/pipe';
|
|
6
|
-
import { ThemeService
|
|
6
|
+
import { ThemeService } from '@piying-lib/angular-daisyui/service';
|
|
7
7
|
import { AttributesDirective, PI_VIEW_FIELD_TOKEN, PiyingViewGroupBase, InsertFieldDirective, BaseControl, PiyingView, PI_INPUT_OPTIONS_TOKEN } from '@piying/view-angular';
|
|
8
8
|
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
9
9
|
import * as i1 from '@angular/material/icon';
|
|
@@ -642,7 +642,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
642
642
|
AttributesDirective,
|
|
643
643
|
inputSortDirective,
|
|
644
644
|
InsertFieldDirective,
|
|
645
|
-
TwPrefixPipe
|
|
645
|
+
TwPrefixPipe,
|
|
646
646
|
], template: "<ng-template #templateRef let-attr=\"attributes\">\n <div class=\"flex items-center\">\n <ng-container insertField></ng-container>\n\n <label\n [class]=\"'swap swap-rotate' | mergeClass: attr()?.class | cssPrefix\"\n [attributes]=\"attr()\"\n [excludes]=\"['class']\"\n >\n <input type=\"checkbox\" [(inputSort)]=\"index$\" [key]=\"key$$()\" />\n\n <div [class]=\"'swap-indeterminate' | cssPrefix\"></div>\n <div [class]=\"'swap-on' | mergeClass: 'flex' | twPrefix\">\n <mat-icon>arrow_upward</mat-icon>\n </div>\n <div [class]=\"'swap-off' | cssPrefix | mergeClass: 'flex' | twPrefix\">\n <mat-icon>arrow_downward</mat-icon>\n </div>\n </label>\n </div>\n</ng-template>\n" }]
|
|
647
647
|
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
|
|
648
648
|
|
|
@@ -679,31 +679,98 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
679
679
|
}]
|
|
680
680
|
}], ctorParameters: () => [], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
|
|
681
681
|
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
#
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
682
|
+
const defaultKey = 'default';
|
|
683
|
+
class CheckboxService {
|
|
684
|
+
#selectModelMap = new Map();
|
|
685
|
+
#field$$ = inject(PI_VIEW_FIELD_TOKEN);
|
|
686
|
+
#data$$ = computed(() => {
|
|
687
|
+
return this.#field$$().inputs()['data'];
|
|
688
|
+
}, ...(ngDevMode ? [{ debugName: "#data$$" }] : []));
|
|
689
|
+
#injector = inject(Injector);
|
|
690
|
+
#defaultDataBind(dataChangeClear = false) {
|
|
691
|
+
effect(() => {
|
|
692
|
+
const data1 = this.#data$$();
|
|
693
|
+
let data2 = Array.isArray(data1) ? data1 : data1?.();
|
|
694
|
+
untracked(() => {
|
|
695
|
+
this.setAllList(() => {
|
|
696
|
+
return data2;
|
|
697
|
+
});
|
|
698
|
+
if (dataChangeClear) {
|
|
699
|
+
this.clear();
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
}, { injector: this.#injector });
|
|
703
|
+
}
|
|
704
|
+
init(define) {
|
|
705
|
+
this.#selectModelMap.clear();
|
|
706
|
+
if (!define) {
|
|
707
|
+
this.#selectModelMap.set(defaultKey, new SelectionModel(true));
|
|
708
|
+
this.#allEvent.set(defaultKey, new Subject());
|
|
709
|
+
this.#defaultDataBind(true);
|
|
710
|
+
}
|
|
711
|
+
else {
|
|
712
|
+
define.config.forEach((item) => {
|
|
713
|
+
this.#selectModelMap.set(item.key, new SelectionModel(item.multiple, item.selected, false, item.compareWith));
|
|
714
|
+
this.#allEvent.set(item.key, new Subject());
|
|
715
|
+
});
|
|
716
|
+
if (define.autoDataBind) {
|
|
717
|
+
this.#defaultDataBind(define.dataChangeClear);
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
toggle(key = defaultKey, value) {
|
|
722
|
+
const result = this.#selectModelMap.get(key);
|
|
723
|
+
result.toggle(value);
|
|
724
|
+
}
|
|
725
|
+
set(key = defaultKey, value, selected) {
|
|
726
|
+
const result = this.#selectModelMap.get(key);
|
|
727
|
+
if (selected) {
|
|
728
|
+
result.select(value);
|
|
729
|
+
}
|
|
730
|
+
else {
|
|
731
|
+
result.deselect(value);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
#fn;
|
|
735
|
+
/** 用来设置一个获得所有列表数据的方法 */
|
|
736
|
+
setAllList(fn) {
|
|
737
|
+
this.#fn = fn;
|
|
738
|
+
}
|
|
739
|
+
#allEvent = new Map();
|
|
740
|
+
selectAll(checked, key = defaultKey) {
|
|
741
|
+
const list = this.#fn();
|
|
742
|
+
const result = this.#selectModelMap.get(key);
|
|
743
|
+
let event$ = this.#allEvent.get(key);
|
|
744
|
+
if (checked) {
|
|
745
|
+
list.forEach((item) => {
|
|
746
|
+
result.select(item);
|
|
747
|
+
});
|
|
748
|
+
}
|
|
749
|
+
else {
|
|
750
|
+
result.clear();
|
|
751
|
+
}
|
|
752
|
+
event$.next(checked);
|
|
753
|
+
}
|
|
754
|
+
listenAllSelect(key = defaultKey) {
|
|
755
|
+
return this.#allEvent.get(key);
|
|
756
|
+
}
|
|
757
|
+
getSelected(key = defaultKey) {
|
|
758
|
+
return this.#selectModelMap.get(key).selected;
|
|
759
|
+
}
|
|
760
|
+
clear() {
|
|
761
|
+
this.#selectModelMap.forEach((item) => {
|
|
762
|
+
item.clear();
|
|
763
|
+
});
|
|
764
|
+
this.#allEvent.forEach((item) => {
|
|
765
|
+
item.next(false);
|
|
693
766
|
});
|
|
694
767
|
}
|
|
695
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type:
|
|
696
|
-
static
|
|
768
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: CheckboxService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
769
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: CheckboxService });
|
|
697
770
|
}
|
|
698
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type:
|
|
699
|
-
type:
|
|
700
|
-
|
|
701
|
-
selector: 'app-checkbox-table',
|
|
702
|
-
template: `<ng-template #templateRef> <ng-container insertField></ng-container></ng-template>`,
|
|
703
|
-
providers: [CheckboxService],
|
|
704
|
-
imports: [InsertFieldDirective],
|
|
705
|
-
}]
|
|
706
|
-
}], ctorParameters: () => [], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
|
|
771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: CheckboxService, decorators: [{
|
|
772
|
+
type: Injectable
|
|
773
|
+
}] });
|
|
707
774
|
|
|
708
775
|
class TableCheckboxAllWC {
|
|
709
776
|
field$$ = inject(PI_VIEW_FIELD_TOKEN);
|
|
@@ -714,16 +781,23 @@ class TableCheckboxAllWC {
|
|
|
714
781
|
#key$$ = computed(() => {
|
|
715
782
|
return this.props$$()['key'];
|
|
716
783
|
}, ...(ngDevMode ? [{ debugName: "#key$$" }] : []));
|
|
717
|
-
|
|
718
|
-
this
|
|
784
|
+
constructor() {
|
|
785
|
+
this.field$$()
|
|
786
|
+
.form.control.valueChanges.pipe(filter((a) => a !== undefined))
|
|
787
|
+
.subscribe((a) => {
|
|
788
|
+
this.#checkboxService.selectAll(a, this.#key$$());
|
|
789
|
+
});
|
|
790
|
+
this.#checkboxService.listenAllSelect(this.#key$$()).subscribe((value) => {
|
|
791
|
+
this.field$$().form.control.updateValue(value);
|
|
792
|
+
});
|
|
719
793
|
}
|
|
720
794
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TableCheckboxAllWC, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
721
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.14", type: TableCheckboxAllWC, isStandalone: true, selector: "app-table-checkbox-all", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <
|
|
795
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.14", type: TableCheckboxAllWC, isStandalone: true, selector: "app-table-checkbox-all", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #templateRef let-attr=\"attributes\">\n <ng-container insertField></ng-container>\n</ng-template>\n", dependencies: [{ kind: "directive", type: InsertFieldDirective, selector: "[insertField]", exportAs: ["insertField"] }] });
|
|
722
796
|
}
|
|
723
797
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TableCheckboxAllWC, decorators: [{
|
|
724
798
|
type: Component,
|
|
725
|
-
args: [{ selector: 'app-table-checkbox-all', imports: [InsertFieldDirective], template: "<ng-template #templateRef let-attr=\"attributes\">\n <
|
|
726
|
-
}], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
|
|
799
|
+
args: [{ selector: 'app-table-checkbox-all', imports: [InsertFieldDirective], template: "<ng-template #templateRef let-attr=\"attributes\">\n <ng-container insertField></ng-container>\n</ng-template>\n" }]
|
|
800
|
+
}], ctorParameters: () => [], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['templateRef', { isSignal: true }] }] } });
|
|
727
801
|
|
|
728
802
|
class TableCheckboxOneWC {
|
|
729
803
|
static __version = 2;
|
|
@@ -738,7 +812,10 @@ class TableCheckboxOneWC {
|
|
|
738
812
|
this.field$$()
|
|
739
813
|
.form.control.valueChanges.pipe(filter((a) => a !== undefined))
|
|
740
814
|
.subscribe((a) => {
|
|
741
|
-
this.#checkboxService.
|
|
815
|
+
this.#checkboxService.set(this.#key$$(), this.field$$().context['item$'](), a);
|
|
816
|
+
});
|
|
817
|
+
this.#checkboxService.listenAllSelect(this.#key$$()).subscribe((value) => {
|
|
818
|
+
this.field$$().form.control.updateValue(value);
|
|
742
819
|
});
|
|
743
820
|
}
|
|
744
821
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TableCheckboxOneWC, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -751,7 +828,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
751
828
|
|
|
752
829
|
var wrapper_index$1 = /*#__PURE__*/Object.freeze({
|
|
753
830
|
__proto__: null,
|
|
754
|
-
CheckboxTablehWC: CheckboxTableWC,
|
|
755
831
|
SortHeaderWC: SortHeaderWC,
|
|
756
832
|
SortTablehWC: SortTablehWC,
|
|
757
833
|
TableCheckboxAllWC: TableCheckboxAllWC,
|
|
@@ -768,7 +844,7 @@ class TableExpandOneTableCell {
|
|
|
768
844
|
#service = this.field$$().context['status'];
|
|
769
845
|
#expand$$ = toSignal(this.#service.selectionModel$$);
|
|
770
846
|
isExpand$$ = computed(() => {
|
|
771
|
-
|
|
847
|
+
const sm = this.#expand$$();
|
|
772
848
|
if (!sm) {
|
|
773
849
|
return false;
|
|
774
850
|
}
|
|
@@ -1140,10 +1216,6 @@ class PickerRefFCC extends BaseControl {
|
|
|
1140
1216
|
context: {
|
|
1141
1217
|
...this.parentPyOptions().context,
|
|
1142
1218
|
pickerValue: this.value$,
|
|
1143
|
-
parent: this.#field$$(),
|
|
1144
|
-
parentCtx: this.parentPyOptions().context,
|
|
1145
|
-
root: this.parentPyOptions().context?.['root'] ?? this.#field$$(),
|
|
1146
|
-
rootCtx: this.parentPyOptions().context?.['rootCtx'] ?? this.parentPyOptions().context,
|
|
1147
1219
|
},
|
|
1148
1220
|
})),
|
|
1149
1221
|
selectorless: true,
|
|
@@ -1369,7 +1441,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
1369
1441
|
|
|
1370
1442
|
var wrapper_index = /*#__PURE__*/Object.freeze({
|
|
1371
1443
|
__proto__: null,
|
|
1372
|
-
CheckboxTablehWC: CheckboxTableWC,
|
|
1373
1444
|
OptionListLocalFilterWC: OptionListLocalFilterWC,
|
|
1374
1445
|
SortHeaderWC: SortHeaderWC,
|
|
1375
1446
|
SortTablehWC: SortTablehWC,
|
|
@@ -1383,5 +1454,5 @@ var wrapper_index = /*#__PURE__*/Object.freeze({
|
|
|
1383
1454
|
* Generated bundle index. Do not edit.
|
|
1384
1455
|
*/
|
|
1385
1456
|
|
|
1386
|
-
export {
|
|
1457
|
+
export { CheckboxService, ExactMatchOptions, ExpandRowDirective, component_index as ExtComponentGroup, wrapper_index as ExtWrapperGroup, ListTemplateNFCC, MenuTreeNFCC, OptionListFCC, OptionListLocalFilterWC, PaginationNFCC, PickerRefFCC, SortHeaderWC, SortTablehWC, SubsetMatchOptions, TableCheckboxAllWC, TableCheckboxOneWC, TableExpandOneTableCell, TableNFCC, TableResourceWC, TableRowFGC, TableStatusService, TableStatusWC, wrapper_index$1 as WrapperGroup, createDefaultColDefine, createDefaultColDefineFn, createRowDefine, inputSortDirective };
|
|
1387
1458
|
//# sourceMappingURL=piying-lib-angular-daisyui-extension.mjs.map
|