@praxisui/list 1.0.0-beta.3 → 1.0.0-beta.30
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 -0
- package/fesm2022/praxisui-list.mjs +662 -36
- package/fesm2022/praxisui-list.mjs.map +1 -1
- package/index.d.ts +68 -1
- package/package.json +4 -4
package/index.d.ts
CHANGED
|
@@ -76,6 +76,10 @@ interface PraxisListConfig {
|
|
|
76
76
|
trailing?: TemplateDef;
|
|
77
77
|
metaPlacement?: 'side' | 'line';
|
|
78
78
|
metaPrefixIcon?: string;
|
|
79
|
+
statusPosition?: 'inline' | 'top-right';
|
|
80
|
+
chipColorMap?: Record<string, string>;
|
|
81
|
+
chipLabelMap?: Record<string, string>;
|
|
82
|
+
iconColorMap?: Record<string, string>;
|
|
79
83
|
features?: ListFeatureDef[];
|
|
80
84
|
featuresVisible?: boolean;
|
|
81
85
|
featuresMode?: 'icons+labels' | 'icons-only' | 'labels-only';
|
|
@@ -96,6 +100,17 @@ interface PraxisListConfig {
|
|
|
96
100
|
emitPayload?: 'item' | 'id' | 'value';
|
|
97
101
|
}>;
|
|
98
102
|
i18n?: Record<string, string>;
|
|
103
|
+
ui?: {
|
|
104
|
+
showSearch?: boolean;
|
|
105
|
+
searchField?: string;
|
|
106
|
+
searchPlaceholder?: string;
|
|
107
|
+
showSort?: boolean;
|
|
108
|
+
sortOptions?: Array<string | {
|
|
109
|
+
label: string;
|
|
110
|
+
value: string;
|
|
111
|
+
}>;
|
|
112
|
+
showRange?: boolean;
|
|
113
|
+
};
|
|
99
114
|
a11y?: {
|
|
100
115
|
ariaLabel?: string;
|
|
101
116
|
ariaLabelledBy?: string;
|
|
@@ -137,6 +152,11 @@ declare class ListDataService<T = any> {
|
|
|
137
152
|
private query$;
|
|
138
153
|
readonly loading$: BehaviorSubject<boolean>;
|
|
139
154
|
readonly total$: BehaviorSubject<number>;
|
|
155
|
+
readonly pageState$: Observable<{
|
|
156
|
+
pageNumber: number;
|
|
157
|
+
pageSize: number;
|
|
158
|
+
sort?: string[];
|
|
159
|
+
}>;
|
|
140
160
|
private lastSig;
|
|
141
161
|
private readonly crud;
|
|
142
162
|
setConfig(config: PraxisListConfig): void;
|
|
@@ -163,6 +183,13 @@ declare class PraxisList implements OnInit, OnChanges {
|
|
|
163
183
|
sections$: rxjs.Observable<ListSection<any>[]>;
|
|
164
184
|
loading$: rxjs.Observable<boolean>;
|
|
165
185
|
total$: rxjs.Observable<number>;
|
|
186
|
+
page$: rxjs.Observable<{
|
|
187
|
+
pageNumber: number;
|
|
188
|
+
pageSize: number;
|
|
189
|
+
sort?: string[];
|
|
190
|
+
}>;
|
|
191
|
+
private lastQuery;
|
|
192
|
+
private search$;
|
|
166
193
|
get layoutLines(): number;
|
|
167
194
|
boundControl: FormControl<unknown | unknown[] | null>;
|
|
168
195
|
skinClasses: string;
|
|
@@ -208,6 +235,19 @@ declare class PraxisList implements OnInit, OnChanges {
|
|
|
208
235
|
openConfigEditor(): void;
|
|
209
236
|
nextPage(): void;
|
|
210
237
|
prevPage(): void;
|
|
238
|
+
setPageSize(ps: number): void;
|
|
239
|
+
onSortChange(val: string): void;
|
|
240
|
+
onSearchInput(val: string): void;
|
|
241
|
+
sortOptionValue(op: any): string;
|
|
242
|
+
sortOptionLabel(op: any): string;
|
|
243
|
+
rangeStart(ps: {
|
|
244
|
+
pageNumber: number;
|
|
245
|
+
pageSize: number;
|
|
246
|
+
}): number;
|
|
247
|
+
rangeEnd(currLen: number, ps: {
|
|
248
|
+
pageNumber: number;
|
|
249
|
+
pageSize: number;
|
|
250
|
+
}, total: number): number;
|
|
211
251
|
private onEditorApplied;
|
|
212
252
|
private readonly crud;
|
|
213
253
|
private tryInferTemplatingFromSchema;
|
|
@@ -217,6 +257,7 @@ declare class PraxisList implements OnInit, OnChanges {
|
|
|
217
257
|
private evalString;
|
|
218
258
|
private parseTwoParams;
|
|
219
259
|
private toBoolean;
|
|
260
|
+
private prettyLabel;
|
|
220
261
|
private mapDateStyle;
|
|
221
262
|
starIcon(index: number, ratingValue: string | number): string;
|
|
222
263
|
trackBySection: (_: number, s: ListSection<any>) => string | number;
|
|
@@ -269,6 +310,7 @@ type NormalizedListConfig = Omit<PraxisListConfig, 'dataSource' | 'layout' | 'se
|
|
|
269
310
|
currency?: string;
|
|
270
311
|
};
|
|
271
312
|
actions?: PraxisListConfig['actions'];
|
|
313
|
+
ui: NonNullable<PraxisListConfig['ui']>;
|
|
272
314
|
};
|
|
273
315
|
declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
274
316
|
config: PraxisListConfig;
|
|
@@ -291,6 +333,7 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
291
333
|
dateStyle?: 'short' | 'medium' | 'long' | 'full';
|
|
292
334
|
class?: string;
|
|
293
335
|
style?: string;
|
|
336
|
+
extraPipe?: string;
|
|
294
337
|
};
|
|
295
338
|
mappingSecondary: {
|
|
296
339
|
field?: string;
|
|
@@ -300,6 +343,7 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
300
343
|
dateStyle?: 'short' | 'medium' | 'long' | 'full';
|
|
301
344
|
class?: string;
|
|
302
345
|
style?: string;
|
|
346
|
+
extraPipe?: string;
|
|
303
347
|
};
|
|
304
348
|
mappingMeta: {
|
|
305
349
|
field?: string;
|
|
@@ -312,11 +356,12 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
312
356
|
placement?: 'side' | 'line';
|
|
313
357
|
chipColor?: string;
|
|
314
358
|
chipVariant?: 'filled' | 'outlined';
|
|
359
|
+
extraPipe?: string;
|
|
315
360
|
};
|
|
316
361
|
mappingMetaPrefixIcon?: string;
|
|
317
362
|
mappingTrailing: {
|
|
318
363
|
field?: string;
|
|
319
|
-
type?: 'text' | 'currency' | 'date' | 'chip';
|
|
364
|
+
type?: 'text' | 'currency' | 'date' | 'chip' | 'icon';
|
|
320
365
|
class?: string;
|
|
321
366
|
style?: string;
|
|
322
367
|
chipColor?: string;
|
|
@@ -324,6 +369,7 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
324
369
|
currencyCode?: string;
|
|
325
370
|
locale?: string;
|
|
326
371
|
dateStyle?: 'short' | 'medium' | 'long' | 'full';
|
|
372
|
+
extraPipe?: string;
|
|
327
373
|
};
|
|
328
374
|
mappingLeading: {
|
|
329
375
|
type: 'icon' | 'image';
|
|
@@ -337,6 +383,16 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
337
383
|
leadingIcon?: string;
|
|
338
384
|
};
|
|
339
385
|
private mappingDirty;
|
|
386
|
+
statusPosition: 'inline' | 'top-right' | undefined;
|
|
387
|
+
iconColorMapEntries: Array<{
|
|
388
|
+
key: string;
|
|
389
|
+
color?: string;
|
|
390
|
+
}>;
|
|
391
|
+
uiSortRows: Array<{
|
|
392
|
+
label?: string;
|
|
393
|
+
field?: string;
|
|
394
|
+
dir?: 'asc' | 'desc';
|
|
395
|
+
}>;
|
|
340
396
|
mappingMetaFields: string[];
|
|
341
397
|
mappingMetaSeparator: string;
|
|
342
398
|
mappingMetaWrapSecondInParens: boolean;
|
|
@@ -380,6 +436,13 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
380
436
|
onSelectionChanged(): void;
|
|
381
437
|
onSkinChanged(): void;
|
|
382
438
|
onPageSizeChange(value: any): void;
|
|
439
|
+
onUiChanged(): void;
|
|
440
|
+
addUiSortRow(): void;
|
|
441
|
+
removeUiSortRow(i: number): void;
|
|
442
|
+
onUiSortRowsChanged(): void;
|
|
443
|
+
isUiSortRowDuplicate(index: number): boolean;
|
|
444
|
+
isIconColorDuplicate(index: number): boolean;
|
|
445
|
+
private hydrateUiEditorFromConfig;
|
|
383
446
|
private loadFieldsIfNeeded;
|
|
384
447
|
updateSortConfig(): void;
|
|
385
448
|
applyTemplate(): void;
|
|
@@ -388,6 +451,10 @@ declare class PraxisListConfigEditor implements SettingsValueProvider, DoCheck {
|
|
|
388
451
|
addFeature(): void;
|
|
389
452
|
removeFeature(idx: number): void;
|
|
390
453
|
onFeaturesChanged(): void;
|
|
454
|
+
addIconColorEntry(): void;
|
|
455
|
+
removeIconColorEntry(i: number): void;
|
|
456
|
+
onIconColorMapChanged(): void;
|
|
457
|
+
setPipe(target: any, spec: string): void;
|
|
391
458
|
insertFeatureToken(index: number, inputEl: HTMLInputElement | HTMLTextAreaElement, field: string): void;
|
|
392
459
|
insertLiteralAt(index: number, inputEl: HTMLInputElement | HTMLTextAreaElement, text: string): void;
|
|
393
460
|
wrapSelectionAt(index: number, inputEl: HTMLInputElement | HTMLTextAreaElement, left: string, right: string): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/list",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.30",
|
|
4
4
|
"description": "List components and helpers for Praxis UI.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": ">=16 <21",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "https://github.com/codexrodrigues/praxis"
|
|
21
|
+
"url": "https://github.com/codexrodrigues/praxis-ui-angular"
|
|
22
22
|
},
|
|
23
|
-
"homepage": "https://github.com/codexrodrigues/praxis#readme",
|
|
23
|
+
"homepage": "https://github.com/codexrodrigues/praxis-ui-angular#readme",
|
|
24
24
|
"bugs": {
|
|
25
|
-
"url": "https://github.com/codexrodrigues/praxis/issues"
|
|
25
|
+
"url": "https://github.com/codexrodrigues/praxis-ui-angular/issues"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"angular",
|