@pure-ds/core 0.7.48 → 0.7.50
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/dist/types/pds.d.ts +7 -5
- package/dist/types/public/assets/pds/components/pds-toaster.d.ts +4 -1
- package/dist/types/public/assets/pds/components/pds-toaster.d.ts.map +1 -1
- package/dist/types/src/js/common/toast.d.ts +9 -0
- package/dist/types/src/js/common/toast.d.ts.map +1 -1
- package/package.json +1 -1
- package/public/assets/js/app.js +2131 -5
- package/public/assets/js/app.js.map +7 -0
- package/public/assets/js/lit.js +1031 -3
- package/public/assets/js/lit.js.map +7 -0
- package/public/assets/js/pds-ask.js +464 -9
- package/public/assets/js/pds-ask.js.map +7 -0
- package/public/assets/js/pds-autocomplete.js +639 -7
- package/public/assets/js/pds-autocomplete.js.map +7 -0
- package/public/assets/js/pds-enhancers.js +1471 -1
- package/public/assets/js/pds-enhancers.js.map +7 -0
- package/public/assets/js/pds-manager.js +17568 -3384
- package/public/assets/js/pds-manager.js.map +7 -0
- package/public/assets/js/pds-toast.js +30 -1
- package/public/assets/js/pds-toast.js.map +7 -0
- package/public/assets/js/pds.js +1969 -2
- package/public/assets/js/pds.js.map +7 -0
- package/public/assets/pds/components/pds-toaster.js +25 -7
- package/public/assets/pds/core/pds-ask.js +464 -9
- package/public/assets/pds/core/pds-autocomplete.js +639 -7
- package/public/assets/pds/core/pds-enhancers.js +1471 -1
- package/public/assets/pds/core/pds-manager.js +17568 -3384
- package/public/assets/pds/core/pds-toast.js +30 -1
- package/public/assets/pds/core.js +1969 -2
- package/public/assets/pds/external/lit.js +1031 -3
- package/src/js/common/toast.js +8 -0
- package/src/js/pds-core/pds-generator.js +1 -1
- package/src/js/pds.d.ts +7 -5
package/dist/types/pds.d.ts
CHANGED
|
@@ -391,6 +391,7 @@ export class PDS extends EventTarget {
|
|
|
391
391
|
* @param message - The message to display
|
|
392
392
|
* @param options - Toast configuration
|
|
393
393
|
* @param options.type - Toast type/severity ("information" | "success" | "warning" | "error")
|
|
394
|
+
* @param options.title - Optional heading override (falls back to type label when empty)
|
|
394
395
|
* @param options.duration - Duration in milliseconds (auto-calculated if not provided)
|
|
395
396
|
* @param options.closable - Whether toast can be manually closed (default: true)
|
|
396
397
|
* @param options.persistent - If true, toast won't auto-dismiss (default: false)
|
|
@@ -406,6 +407,7 @@ export class PDS extends EventTarget {
|
|
|
406
407
|
message: string,
|
|
407
408
|
options?: {
|
|
408
409
|
type?: 'information' | 'success' | 'warning' | 'error';
|
|
410
|
+
title?: string;
|
|
409
411
|
duration?: number;
|
|
410
412
|
closable?: boolean;
|
|
411
413
|
persistent?: boolean;
|
|
@@ -423,11 +425,11 @@ export class PDS extends EventTarget {
|
|
|
423
425
|
* await PDS.toast.success('Profile updated!');
|
|
424
426
|
*/
|
|
425
427
|
static toast: {
|
|
426
|
-
(message: string, options?: { type?: 'information' | 'success' | 'warning' | 'error'; duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
427
|
-
success(message: string, options?: { duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
428
|
-
error(message: string, options?: { duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
429
|
-
warning(message: string, options?: { duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
430
|
-
info(message: string, options?: { duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
428
|
+
(message: string, options?: { type?: 'information' | 'success' | 'warning' | 'error'; title?: string; duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
429
|
+
success(message: string, options?: { title?: string; duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
430
|
+
error(message: string, options?: { title?: string; duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
431
|
+
warning(message: string, options?: { title?: string; duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
432
|
+
info(message: string, options?: { title?: string; duration?: number; closable?: boolean; persistent?: boolean }): Promise<string>;
|
|
431
433
|
};
|
|
432
434
|
|
|
433
435
|
/**
|
|
@@ -40,6 +40,7 @@ export class AppToaster extends HTMLElement {
|
|
|
40
40
|
* @param {string} message - The message to display
|
|
41
41
|
* @param {Object} [options] - Toast configuration
|
|
42
42
|
* @param {"information"|"success"|"warning"|"error"} [options.type="information"] - Toast type
|
|
43
|
+
* @param {string} [options.title] - Optional heading text (falls back to type-based title when empty)
|
|
43
44
|
* @param {number} [options.duration] - Duration in ms (auto-calculated if not provided)
|
|
44
45
|
* @param {boolean} [options.closable=true] - Whether toast can be closed manually
|
|
45
46
|
* @param {boolean} [options.persistent=false] - If true, toast doesn't auto-dismiss
|
|
@@ -47,6 +48,7 @@ export class AppToaster extends HTMLElement {
|
|
|
47
48
|
*/
|
|
48
49
|
public toast(message: string, options?: {
|
|
49
50
|
type?: "information" | "success" | "warning" | "error";
|
|
51
|
+
title?: string;
|
|
50
52
|
duration?: number;
|
|
51
53
|
closable?: boolean;
|
|
52
54
|
persistent?: boolean;
|
|
@@ -56,12 +58,13 @@ export class AppToaster extends HTMLElement {
|
|
|
56
58
|
* @param {string} id
|
|
57
59
|
* @param {string} message
|
|
58
60
|
* @param {"information"|"success"|"warning"|"error"} type
|
|
61
|
+
* @param {string|null|undefined} title
|
|
59
62
|
* @param {boolean} closable
|
|
60
63
|
* @param {number} duration
|
|
61
64
|
* @param {boolean} persistent
|
|
62
65
|
* @returns {HTMLElement}
|
|
63
66
|
*/
|
|
64
|
-
createToastElement(id: string, message: string, type: "information" | "success" | "warning" | "error", closable: boolean, duration: number, persistent: boolean, html?: boolean, action?: any): HTMLElement;
|
|
67
|
+
createToastElement(id: string, message: string, type: "information" | "success" | "warning" | "error", title: string | null | undefined, closable: boolean, duration: number, persistent: boolean, html?: boolean, action?: any): HTMLElement;
|
|
65
68
|
/**
|
|
66
69
|
* Dismiss a toast by ID
|
|
67
70
|
* @method dismissToast
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-toaster.d.ts","sourceRoot":"","sources":["../../../../../../public/assets/pds/components/pds-toaster.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAGI,cAAgB;IAChB,0BAAgC;IAChC,mCAAoC;IACpC,mCAAoC;IAGtC;;;OAGG;IACH,qBAFa,OAAO,CAAC,IAAI,CAAC,CA+JzB;IAxJC,oCAGC;IAuJH;;OAEG;IACH,6BAMC;IAED
|
|
1
|
+
{"version":3,"file":"pds-toaster.d.ts","sourceRoot":"","sources":["../../../../../../public/assets/pds/components/pds-toaster.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IAGI,cAAgB;IAChB,0BAAgC;IAChC,mCAAoC;IACpC,mCAAoC;IAGtC;;;OAGG;IACH,qBAFa,OAAO,CAAC,IAAI,CAAC,CA+JzB;IAxJC,oCAGC;IAuJH;;OAEG;IACH,6BAMC;IAED;;;;;;;;;;;;OAYG;IACH,sBATW,MAAM,YAEd;QAA4D,IAAI,GAAxD,aAAa,GAAC,SAAS,GAAC,SAAS,GAAC,OAAO;QACvB,KAAK,GAAtB,MAAM;QACU,QAAQ,GAAzB,MAAM;QACY,QAAQ,GAA1B,OAAO;QACW,UAAU,GAA5B,OAAO;KACf,GAAU,MAAM,CAqClB;IA6CD;;;;;;;;;;OAUG;IACH,uBATW,MAAM,WACN,MAAM,QACN,aAAa,GAAC,SAAS,GAAC,SAAS,GAAC,OAAO,SACxC,MAAM,GAAC,IAAI,GAAC,SAAS,YACtB,OAAO,YACP,MAAM,cACN,OAAO,iCACL,WAAW,CA+EvB;IAED;;;;;OAKG;IACH,6BAFW,MAAM,QAyBhB;IAED;;OAEG;IACH,mBAgBC;IAmFD;;;;;;;OAOG;IACH,6BAJW,MAAM,kBAEJ,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,6BAJW,MAAM,kBAEJ,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,2BAJW,MAAM,kBAEJ,MAAM,CAIlB;IAED;;;;;;;OAOG;IACH,0BAJW,MAAM,kBAEJ,MAAM,CAIlB;;CACF"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @param {string} message - The message to display
|
|
9
9
|
* @param {Object} [options={}] - Toast configuration
|
|
10
10
|
* @param {"information"|"success"|"warning"|"error"} [options.type="information"] - Toast type/severity
|
|
11
|
+
* @param {string} [options.title] - Optional heading override (falls back to type label when empty)
|
|
11
12
|
* @param {number} [options.duration] - Duration in milliseconds (auto-calculated if not provided based on message length)
|
|
12
13
|
* @param {boolean} [options.closable=true] - Whether the toast can be manually closed
|
|
13
14
|
* @param {boolean} [options.persistent=false] - If true, toast won't auto-dismiss (requires manual close)
|
|
@@ -27,6 +28,13 @@
|
|
|
27
28
|
* });
|
|
28
29
|
*
|
|
29
30
|
* @example
|
|
31
|
+
* // Custom title overrides type-derived heading
|
|
32
|
+
* await PDS.toast('Feature coming soon...', {
|
|
33
|
+
* type: 'information',
|
|
34
|
+
* title: 'Qogni'
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
30
38
|
* // Persistent warning (must be manually closed)
|
|
31
39
|
* await PDS.toast('This action cannot be undone', {
|
|
32
40
|
* type: 'warning',
|
|
@@ -42,6 +50,7 @@
|
|
|
42
50
|
*/
|
|
43
51
|
export function toast(message: string, options?: {
|
|
44
52
|
type?: "information" | "success" | "warning" | "error";
|
|
53
|
+
title?: string;
|
|
45
54
|
duration?: number;
|
|
46
55
|
closable?: boolean;
|
|
47
56
|
persistent?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../../../src/js/common/toast.js"],"names":[],"mappings":"AAoBA
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../../../src/js/common/toast.js"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,+BA3CW,MAAM,YAEd;IAA4D,IAAI,GAAxD,aAAa,GAAC,SAAS,GAAC,SAAS,GAAC,OAAO;IACxB,KAAK,GAAtB,MAAM;IACW,QAAQ,GAAzB,MAAM;IACY,QAAQ,GAA1B,OAAO;IACW,UAAU,GAA5B,OAAO;IACW,IAAI,GAAtB,OAAO;IACiE,MAAM,GAA9E;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,WAAW;QAAC,cAAc,CAAC,EAAE,OAAO,CAAA;KAAC;CACrE,GAAU,OAAO,CAAC,MAAM,CAAC,CAqC3B;;IAED;;;;;;;;;OASG;IACH,0BAPW,MAAM,kBAEJ,OAAO,CAAC,MAAM,CAAC,CAO3B;IAED;;;;;;;;;OASG;IACH,wBAPW,MAAM,kBAEJ,OAAO,CAAC,MAAM,CAAC,CAO3B;IAED;;;;;;;;;OASG;IACH,0BAPW,MAAM,kBAEJ,OAAO,CAAC,MAAM,CAAC,CAO3B;IAED;;;;;;;;;OASG;IACH,uBAPW,MAAM,kBAEJ,OAAO,CAAC,MAAM,CAAC,CAO3B"}
|