@ezeep/ezeep-js 1.0.272 → 1.0.284

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.
Files changed (132) hide show
  1. package/dist/cjs/{app-globals-D7ISNeUi.js → app-globals-L_3XPZxT.js} +7 -1
  2. package/dist/cjs/ezeep.cjs.js +4 -4
  3. package/dist/cjs/ezp-auth_15.cjs.entry.js +7338 -3700
  4. package/dist/cjs/{index-dv_gozsq.js → index-DM5v_sge.js} +3 -2
  5. package/dist/cjs/loader.cjs.js +3 -3
  6. package/dist/collection/collection-manifest.json +1 -1
  7. package/dist/collection/components/ezp-auth/ezp-auth.css +0 -12
  8. package/dist/collection/components/ezp-auth/ezp-auth.js +78 -18
  9. package/dist/collection/components/ezp-backdrop/ezp-backdrop.js +5 -5
  10. package/dist/collection/components/ezp-dialog/ezp-dialog.js +85 -13
  11. package/dist/collection/components/ezp-icon/assets/glyph-cloud-upload.svg +4 -0
  12. package/dist/collection/components/ezp-icon/assets/glyph-file.svg +3 -0
  13. package/dist/collection/components/ezp-icon/ezp-icon.js +8 -3
  14. package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +5 -2
  15. package/dist/collection/components/ezp-input/ezp-input.css +19 -38
  16. package/dist/collection/components/ezp-input/ezp-input.js +16 -14
  17. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +175 -48
  18. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +215 -329
  19. package/dist/collection/components/ezp-printing/ezp-printing.css +23 -23
  20. package/dist/collection/components/ezp-printing/ezp-printing.js +119 -35
  21. package/dist/collection/components/ezp-select/ezp-select.css +56 -38
  22. package/dist/collection/components/ezp-select/ezp-select.js +93 -14
  23. package/dist/collection/components/ezp-status/ezp-status.css +94 -9
  24. package/dist/collection/components/ezp-status/ezp-status.js +42 -13
  25. package/dist/collection/components/ezp-stepper/ezp-stepper.css +37 -35
  26. package/dist/collection/components/ezp-stepper/ezp-stepper.js +14 -7
  27. package/dist/collection/components/ezp-text-button/ezp-text-button.css +3 -3
  28. package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
  29. package/dist/collection/components/ezp-upload/ezp-upload.css +243 -77
  30. package/dist/collection/components/ezp-upload/ezp-upload.js +80 -10
  31. package/dist/collection/components/ezp-user-menu/ezp-user-menu.css +2 -1
  32. package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +15 -15
  33. package/dist/collection/services/auth.js +37 -36
  34. package/dist/collection/services/http.js +11 -0
  35. package/dist/collection/services/print-job.js +72 -0
  36. package/dist/collection/services/print.js +21 -69
  37. package/dist/collection/services/user.js +2 -9
  38. package/dist/collection/shared/constants.js +55 -0
  39. package/dist/collection/shared/global.js +7 -1
  40. package/dist/collection/shared/storage.js +71 -0
  41. package/dist/collection/types/shared/types.d.ts +42 -9
  42. package/dist/collection/utils/printer.js +68 -0
  43. package/dist/collection/utils/utils.js +24 -9
  44. package/dist/components/auth.js +1 -1
  45. package/dist/components/ezp-auth2.js +1 -1
  46. package/dist/components/ezp-backdrop2.js +1 -1
  47. package/dist/components/ezp-dialog2.js +1 -1
  48. package/dist/components/ezp-icon-button2.js +1 -1
  49. package/dist/components/ezp-icon2.js +1 -1
  50. package/dist/components/ezp-input2.js +1 -1
  51. package/dist/components/ezp-printer-selection2.js +1 -1
  52. package/dist/components/ezp-printing.js +1 -1
  53. package/dist/components/ezp-select2.js +1 -1
  54. package/dist/components/ezp-status2.js +1 -1
  55. package/dist/components/ezp-stepper2.js +1 -1
  56. package/dist/components/ezp-text-button2.js +1 -1
  57. package/dist/components/ezp-upload2.js +1 -1
  58. package/dist/components/ezp-user-menu.js +1 -1
  59. package/dist/components/ezp-user-menu2.js +1 -1
  60. package/dist/components/index.js +1 -1
  61. package/dist/components/utils.js +1 -0
  62. package/dist/directives/proxies.ts +74 -47
  63. package/dist/esm/{app-globals-CpP67t2l.js → app-globals-C0WTlb31.js} +7 -1
  64. package/dist/esm/ezeep.js +5 -5
  65. package/dist/esm/ezp-auth_15.entry.js +7338 -3700
  66. package/dist/esm/{index-BTfWEHH9.js → index-BButrLnB.js} +3 -3
  67. package/dist/esm/loader.js +4 -4
  68. package/dist/esm-es5/{app-globals-CpP67t2l.js → app-globals-C0WTlb31.js} +1 -1
  69. package/dist/esm-es5/ezeep.js +1 -1
  70. package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
  71. package/dist/esm-es5/{index-BTfWEHH9.js → index-BButrLnB.js} +3 -3
  72. package/dist/esm-es5/loader.js +1 -1
  73. package/dist/ezeep/assets/glyph-cloud-upload.svg +4 -0
  74. package/dist/ezeep/assets/glyph-file.svg +3 -0
  75. package/dist/ezeep/ezeep.esm.js +1 -1
  76. package/dist/ezeep/ezeep.js +1 -1
  77. package/dist/ezeep/p-1e286bd1.system.entry.js +7 -0
  78. package/dist/ezeep/{p-BTfWEHH9.js → p-BButrLnB.js} +2 -2
  79. package/dist/ezeep/{p-CpP67t2l.js → p-C0WTlb31.js} +1 -1
  80. package/{www/build/p-DhXN1yGM.system.js → dist/ezeep/p-CYpousxy.system.js} +2 -2
  81. package/dist/ezeep/{p-5ok9OZMg.system.js → p-D4aCr1OK.system.js} +1 -1
  82. package/dist/ezeep/p-DCznw2Ee.system.js +1 -0
  83. package/dist/ezeep/p-a2b688f0.entry.js +1 -0
  84. package/dist/ezeep/types/shared/types.d.ts +42 -9
  85. package/dist/types/components/ezp-auth/ezp-auth.d.ts +8 -5
  86. package/dist/types/components/ezp-backdrop/ezp-backdrop.d.ts +2 -2
  87. package/dist/types/components/ezp-dialog/ezp-dialog.d.ts +14 -3
  88. package/dist/types/components/ezp-input/ezp-input.d.ts +17 -14
  89. package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +23 -7
  90. package/dist/types/components/ezp-printing/ezp-printing.d.ts +26 -2
  91. package/dist/types/components/ezp-select/ezp-select.d.ts +10 -4
  92. package/dist/types/components/ezp-status/ezp-status.d.ts +7 -4
  93. package/dist/types/components/ezp-stepper/ezp-stepper.d.ts +1 -1
  94. package/dist/types/components/ezp-upload/ezp-upload.d.ts +13 -1
  95. package/dist/types/components/ezp-user-menu/ezp-user-menu.d.ts +5 -2
  96. package/dist/types/components.d.ts +47 -39
  97. package/dist/types/services/auth.d.ts +10 -0
  98. package/dist/types/services/http.d.ts +4 -0
  99. package/dist/types/services/print-job.d.ts +48 -0
  100. package/dist/types/services/print.d.ts +10 -9
  101. package/dist/types/services/user.d.ts +13 -2
  102. package/dist/types/shared/constants.d.ts +51 -0
  103. package/dist/types/shared/storage.d.ts +24 -0
  104. package/dist/types/shared/types.d.ts +42 -9
  105. package/dist/types/stencil-public-runtime.d.ts +1 -0
  106. package/dist/types/utils/printer.d.ts +22 -0
  107. package/dist/types/utils/utils.d.ts +22 -10
  108. package/package.json +30 -18
  109. package/readme.md +1 -0
  110. package/www/build/assets/glyph-cloud-upload.svg +4 -0
  111. package/www/build/assets/glyph-file.svg +3 -0
  112. package/www/build/ezeep.esm.js +1 -1
  113. package/www/build/ezeep.js +1 -1
  114. package/www/build/p-1e286bd1.system.entry.js +7 -0
  115. package/www/build/p-544b7033.js +1 -0
  116. package/www/build/{p-BTfWEHH9.js → p-BButrLnB.js} +2 -2
  117. package/www/build/{p-CpP67t2l.js → p-C0WTlb31.js} +1 -1
  118. package/{dist/ezeep/p-DhXN1yGM.system.js → www/build/p-CYpousxy.system.js} +2 -2
  119. package/www/build/{p-5ok9OZMg.system.js → p-D4aCr1OK.system.js} +1 -1
  120. package/www/build/p-DCznw2Ee.system.js +1 -0
  121. package/www/build/p-a2b688f0.entry.js +1 -0
  122. package/www/data/locales/de.json +14 -5
  123. package/www/data/locales/en.json +14 -5
  124. package/www/index.html +2 -5
  125. package/dist/components/i18next.js +0 -1
  126. package/dist/ezeep/p-2177b8f4.system.entry.js +0 -7
  127. package/dist/ezeep/p-CfQRcOh8.system.js +0 -1
  128. package/dist/ezeep/p-de8f6583.entry.js +0 -1
  129. package/www/build/p-2177b8f4.system.entry.js +0 -7
  130. package/www/build/p-256870db.js +0 -1
  131. package/www/build/p-CfQRcOh8.system.js +0 -1
  132. package/www/build/p-de8f6583.entry.js +0 -1
@@ -249,9 +249,9 @@ export namespace Components {
249
249
  */
250
250
  "placeholder": string;
251
251
  /**
252
- * Description...
252
+ * The currently-selected option, matched by title (string) or id (number).
253
253
  */
254
- "preSelected": any;
254
+ "preSelected": string | number | null;
255
255
  /**
256
256
  * Description...
257
257
  * @default 'horizontal'
@@ -273,6 +273,7 @@ export namespace Components {
273
273
  */
274
274
  "processing": boolean;
275
275
  "retry"?: string | boolean;
276
+ "subtext"?: string;
276
277
  }
277
278
  interface EzpStepper {
278
279
  /**
@@ -388,8 +389,8 @@ export interface EzpUserMenuCustomEvent<T> extends CustomEvent<T> {
388
389
  declare global {
389
390
  interface HTMLEzpAuthElementEventMap {
390
391
  "authCancel": MouseEvent;
391
- "authSuccess": any;
392
- "userCancel": any;
392
+ "authSuccess": void;
393
+ "userCancel": void;
393
394
  }
394
395
  interface HTMLEzpAuthElement extends Components.EzpAuth, HTMLStencilElement {
395
396
  addEventListener<K extends keyof HTMLEzpAuthElementEventMap>(type: K, listener: (this: HTMLEzpAuthElement, ev: EzpAuthCustomEvent<HTMLEzpAuthElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -406,8 +407,8 @@ declare global {
406
407
  new (): HTMLEzpAuthElement;
407
408
  };
408
409
  interface HTMLEzpBackdropElementEventMap {
409
- "backdropHideStart": any;
410
- "backdropHideEnd": any;
410
+ "backdropHideStart": void;
411
+ "backdropHideEnd": void;
411
412
  }
412
413
  interface HTMLEzpBackdropElement extends Components.EzpBackdrop, HTMLStencilElement {
413
414
  addEventListener<K extends keyof HTMLEzpBackdropElementEventMap>(type: K, listener: (this: HTMLEzpBackdropElement, ev: EzpBackdropCustomEvent<HTMLEzpBackdropElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -424,8 +425,8 @@ declare global {
424
425
  new (): HTMLEzpBackdropElement;
425
426
  };
426
427
  interface HTMLEzpDialogElementEventMap {
427
- "dialogClose": any;
428
- "dialogAction": any;
428
+ "dialogClose": string;
429
+ "dialogAction": string;
429
430
  }
430
431
  interface HTMLEzpDialogElement extends Components.EzpDialog, HTMLStencilElement {
431
432
  addEventListener<K extends keyof HTMLEzpDialogElementEventMap>(type: K, listener: (this: HTMLEzpDialogElement, ev: EzpDialogCustomEvent<HTMLEzpDialogElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -454,7 +455,7 @@ declare global {
454
455
  new (): HTMLEzpIconButtonElement;
455
456
  };
456
457
  interface HTMLEzpInputElementEventMap {
457
- "inputValueChanged": any;
458
+ "inputValueChanged": { type: string; value: string | number };
458
459
  }
459
460
  interface HTMLEzpInputElement extends Components.EzpInput, HTMLStencilElement {
460
461
  addEventListener<K extends keyof HTMLEzpInputElementEventMap>(type: K, listener: (this: HTMLEzpInputElement, ev: EzpInputCustomEvent<HTMLEzpInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -496,7 +497,7 @@ declare global {
496
497
  new (): HTMLEzpPrinterSelectionElement;
497
498
  };
498
499
  interface HTMLEzpPrintingElementEventMap {
499
- "printFinished": any;
500
+ "printFinished": void;
500
501
  }
501
502
  interface HTMLEzpPrintingElement extends Components.EzpPrinting, HTMLStencilElement {
502
503
  addEventListener<K extends keyof HTMLEzpPrintingElementEventMap>(type: K, listener: (this: HTMLEzpPrintingElement, ev: EzpPrintingCustomEvent<HTMLEzpPrintingElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -513,8 +514,8 @@ declare global {
513
514
  new (): HTMLEzpPrintingElement;
514
515
  };
515
516
  interface HTMLEzpSelectElementEventMap {
516
- "selectToggle": any;
517
- "selectSelection": any;
517
+ "selectToggle": boolean;
518
+ "selectSelection": SelectOptionType;
518
519
  }
519
520
  interface HTMLEzpSelectElement extends Components.EzpSelect, HTMLStencilElement {
520
521
  addEventListener<K extends keyof HTMLEzpSelectElementEventMap>(type: K, listener: (this: HTMLEzpSelectElement, ev: EzpSelectCustomEvent<HTMLEzpSelectElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -531,9 +532,9 @@ declare global {
531
532
  new (): HTMLEzpSelectElement;
532
533
  };
533
534
  interface HTMLEzpStatusElementEventMap {
534
- "statusCancel": any;
535
- "statusClose": any;
536
- "statusRetry": any;
535
+ "statusCancel": string;
536
+ "statusClose": string;
537
+ "statusRetry": string;
537
538
  }
538
539
  interface HTMLEzpStatusElement extends Components.EzpStatus, HTMLStencilElement {
539
540
  addEventListener<K extends keyof HTMLEzpStatusElementEventMap>(type: K, listener: (this: HTMLEzpStatusElement, ev: EzpStatusCustomEvent<HTMLEzpStatusElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -550,7 +551,7 @@ declare global {
550
551
  new (): HTMLEzpStatusElement;
551
552
  };
552
553
  interface HTMLEzpStepperElementEventMap {
553
- "stepperChanged": any;
554
+ "stepperChanged": number;
554
555
  }
555
556
  interface HTMLEzpStepperElement extends Components.EzpStepper, HTMLStencilElement {
556
557
  addEventListener<K extends keyof HTMLEzpStepperElementEventMap>(type: K, listener: (this: HTMLEzpStepperElement, ev: EzpStepperCustomEvent<HTMLEzpStepperElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -573,7 +574,8 @@ declare global {
573
574
  new (): HTMLEzpTextButtonElement;
574
575
  };
575
576
  interface HTMLEzpUploadElementEventMap {
576
- "uploadFile": any;
577
+ "uploadFile": File[];
578
+ "uploadContinue": File[];
577
579
  }
578
580
  interface HTMLEzpUploadElement extends Components.EzpUpload, HTMLStencilElement {
579
581
  addEventListener<K extends keyof HTMLEzpUploadElementEventMap>(type: K, listener: (this: HTMLEzpUploadElement, ev: EzpUploadCustomEvent<HTMLEzpUploadElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -590,8 +592,8 @@ declare global {
590
592
  new (): HTMLEzpUploadElement;
591
593
  };
592
594
  interface HTMLEzpUserMenuElementEventMap {
593
- "userMenuClosure": any;
594
- "logoutEmitter": any;
595
+ "userMenuClosure": void;
596
+ "logoutEmitter": void;
595
597
  }
596
598
  interface HTMLEzpUserMenuElement extends Components.EzpUserMenu, HTMLStencilElement {
597
599
  addEventListener<K extends keyof HTMLEzpUserMenuElementEventMap>(type: K, listener: (this: HTMLEzpUserMenuElement, ev: EzpUserMenuCustomEvent<HTMLEzpUserMenuElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -633,14 +635,14 @@ declare namespace LocalJSX {
633
635
  "code"?: string;
634
636
  "hidelogin"?: boolean;
635
637
  "onAuthCancel"?: (event: EzpAuthCustomEvent<MouseEvent>) => void;
636
- "onAuthSuccess"?: (event: EzpAuthCustomEvent<any>) => void;
637
- "onUserCancel"?: (event: EzpAuthCustomEvent<any>) => void;
638
+ "onAuthSuccess"?: (event: EzpAuthCustomEvent<void>) => void;
639
+ "onUserCancel"?: (event: EzpAuthCustomEvent<void>) => void;
638
640
  "redirectURI"?: string;
639
641
  "trigger"?: string;
640
642
  }
641
643
  interface EzpBackdrop {
642
- "onBackdropHideEnd"?: (event: EzpBackdropCustomEvent<any>) => void;
643
- "onBackdropHideStart"?: (event: EzpBackdropCustomEvent<any>) => void;
644
+ "onBackdropHideEnd"?: (event: EzpBackdropCustomEvent<void>) => void;
645
+ "onBackdropHideStart"?: (event: EzpBackdropCustomEvent<void>) => void;
644
646
  /**
645
647
  * @default true
646
648
  */
@@ -666,11 +668,11 @@ declare namespace LocalJSX {
666
668
  */
667
669
  "iconSize"?: IconSizeTypes;
668
670
  "instance"?: string;
669
- "onDialogAction"?: (event: EzpDialogCustomEvent<any>) => void;
671
+ "onDialogAction"?: (event: EzpDialogCustomEvent<string>) => void;
670
672
  /**
671
673
  * Events
672
674
  */
673
- "onDialogClose"?: (event: EzpDialogCustomEvent<any>) => void;
675
+ "onDialogClose"?: (event: EzpDialogCustomEvent<string>) => void;
674
676
  }
675
677
  interface EzpIcon {
676
678
  /**
@@ -735,7 +737,7 @@ declare namespace LocalJSX {
735
737
  /**
736
738
  * Events
737
739
  */
738
- "onInputValueChanged"?: (event: EzpInputCustomEvent<any>) => void;
740
+ "onInputValueChanged"?: (event: EzpInputCustomEvent<{ type: string; value: string | number }>) => void;
739
741
  /**
740
742
  * Description...
741
743
  * @default ''
@@ -845,7 +847,7 @@ declare namespace LocalJSX {
845
847
  /**
846
848
  * Events
847
849
  */
848
- "onPrintFinished"?: (event: EzpPrintingCustomEvent<any>) => void;
850
+ "onPrintFinished"?: (event: EzpPrintingCustomEvent<void>) => void;
849
851
  "printapihosturl"?: string;
850
852
  "redirecturi"?: string;
851
853
  /**
@@ -873,11 +875,11 @@ declare namespace LocalJSX {
873
875
  * @default 'Label'
874
876
  */
875
877
  "label"?: string;
876
- "onSelectSelection"?: (event: EzpSelectCustomEvent<any>) => void;
878
+ "onSelectSelection"?: (event: EzpSelectCustomEvent<SelectOptionType>) => void;
877
879
  /**
878
880
  * Events
879
881
  */
880
- "onSelectToggle"?: (event: EzpSelectCustomEvent<any>) => void;
882
+ "onSelectToggle"?: (event: EzpSelectCustomEvent<boolean>) => void;
881
883
  /**
882
884
  * Description...
883
885
  */
@@ -892,9 +894,9 @@ declare namespace LocalJSX {
892
894
  */
893
895
  "placeholder"?: string;
894
896
  /**
895
- * Description...
897
+ * The currently-selected option, matched by title (string) or id (number).
896
898
  */
897
- "preSelected"?: any;
899
+ "preSelected"?: string | number | null;
898
900
  /**
899
901
  * Description...
900
902
  * @default 'horizontal'
@@ -914,14 +916,15 @@ declare namespace LocalJSX {
914
916
  /**
915
917
  * Events
916
918
  */
917
- "onStatusCancel"?: (event: EzpStatusCustomEvent<any>) => void;
918
- "onStatusClose"?: (event: EzpStatusCustomEvent<any>) => void;
919
- "onStatusRetry"?: (event: EzpStatusCustomEvent<any>) => void;
919
+ "onStatusCancel"?: (event: EzpStatusCustomEvent<string>) => void;
920
+ "onStatusClose"?: (event: EzpStatusCustomEvent<string>) => void;
921
+ "onStatusRetry"?: (event: EzpStatusCustomEvent<string>) => void;
920
922
  /**
921
923
  * @default false
922
924
  */
923
925
  "processing"?: boolean;
924
926
  "retry"?: string | boolean;
927
+ "subtext"?: string;
925
928
  }
926
929
  interface EzpStepper {
927
930
  /**
@@ -945,7 +948,7 @@ declare namespace LocalJSX {
945
948
  /**
946
949
  * Events
947
950
  */
948
- "onStepperChanged"?: (event: EzpStepperCustomEvent<any>) => void;
951
+ "onStepperChanged"?: (event: EzpStepperCustomEvent<number>) => void;
949
952
  }
950
953
  interface EzpTextButton {
951
954
  /**
@@ -983,20 +986,24 @@ declare namespace LocalJSX {
983
986
  }
984
987
  interface EzpUpload {
985
988
  /**
986
- * Events
989
+ * Fired when the user confirms the selection and wants to move on to print options.
990
+ */
991
+ "onUploadContinue"?: (event: EzpUploadCustomEvent<File[]>) => void;
992
+ /**
993
+ * Keeps the parent's file state in sync as the selection changes.
987
994
  */
988
- "onUploadFile"?: (event: EzpUploadCustomEvent<any>) => void;
995
+ "onUploadFile"?: (event: EzpUploadCustomEvent<File[]>) => void;
989
996
  }
990
997
  interface EzpUserMenu {
991
998
  /**
992
999
  * @default 'John Doe'
993
1000
  */
994
1001
  "name"?: string;
995
- "onLogoutEmitter"?: (event: EzpUserMenuCustomEvent<any>) => void;
1002
+ "onLogoutEmitter"?: (event: EzpUserMenuCustomEvent<void>) => void;
996
1003
  /**
997
1004
  * Events
998
1005
  */
999
- "onUserMenuClosure"?: (event: EzpUserMenuCustomEvent<any>) => void;
1006
+ "onUserMenuClosure"?: (event: EzpUserMenuCustomEvent<void>) => void;
1000
1007
  /**
1001
1008
  * @default false
1002
1009
  */
@@ -1094,6 +1101,7 @@ declare namespace LocalJSX {
1094
1101
  }
1095
1102
  interface EzpStatusAttributes {
1096
1103
  "description": string;
1104
+ "subtext": string;
1097
1105
  "processing": boolean;
1098
1106
  "instance": string;
1099
1107
  "icon": IconNameTypes;
@@ -14,6 +14,15 @@ export declare class EzpAuthorizationService {
14
14
  generateCodeVerifier(): void;
15
15
  generateCodeChallenge(codeVerifier: string): Promise<void>;
16
16
  buildAuthURI(): void;
17
+ /** Shared auth headers for the OAuth token endpoints (Basic auth, form body). */
18
+ private oauthHeaders;
19
+ /**
20
+ * Persist tokens. The access token is kept in memory only (auth store +
21
+ * instance field) — it is deliberately NOT written to localStorage, so an XSS
22
+ * on the host page can't read it. Only the refresh token (needed to re-auth
23
+ * after a reload) and the isAuthorized hint are persisted.
24
+ */
25
+ private persistTokens;
17
26
  getAccessToken(): Promise<void>;
18
27
  refreshTokens(): Promise<void>;
19
28
  revokeRefreshToken(): void;
@@ -28,6 +37,7 @@ declare const authStore: import("@stencil/store").ObservableMap<{
28
37
  authApiHostUrl: string;
29
38
  redirectUri: string;
30
39
  authUri: string;
40
+ clientID: string;
31
41
  }>;
32
42
  export default authStore;
33
43
  export declare function sendCodeToParentWindow(): void;
@@ -0,0 +1,4 @@
1
+ /** Authorization header for a Bearer-token request. */
2
+ export declare function bearer(accessToken: string): Record<string, string>;
3
+ /** GET a URL with a Bearer token and parse the JSON body. */
4
+ export declare function authGetJson<T = any>(url: string, accessToken: string): Promise<T>;
@@ -0,0 +1,48 @@
1
+ import { PrinterProperties, JobStatusResponse, PrintResponse } from '../shared/types';
2
+ /**
3
+ * The slice of `EzpPrintService` this orchestrator needs. Declared structurally
4
+ * so the print flow can be unit-tested with a plain mock, and so this module
5
+ * has no dependency back on the service implementation.
6
+ */
7
+ export interface PrintApi {
8
+ prepareFileUpload(accessToken: string): Promise<{
9
+ fileid: string;
10
+ sasUri: string;
11
+ }>;
12
+ uploadBlobFiles(sasUri: string, file: File): Promise<{
13
+ _response: {
14
+ status: number;
15
+ };
16
+ }>;
17
+ printByFileID(accessToken: string, fileID: string, fileType: string, printerID: string, properties: PrinterProperties, filename?: string): Promise<PrintResponse>;
18
+ getPrintStatus(): Promise<JobStatusResponse>;
19
+ }
20
+ /** Lower-cased file extension, or '' when there is none. */
21
+ export declare function fileExtension(filename: string): string;
22
+ /**
23
+ * Poll the print status until the job reaches a terminal state. Resolves on
24
+ * success; throws on failure, a hub-driver error, or when the polling budget is
25
+ * exhausted (so a stuck job fails instead of polling forever). Unknown statuses
26
+ * are treated as failures for safety.
27
+ */
28
+ export declare function waitForJobCompletion(getStatus: () => Promise<JobStatusResponse>, isQueue: boolean, pollIntervalMs?: number, maxAttempts?: number): Promise<void>;
29
+ export interface PrintJobContext {
30
+ service: PrintApi;
31
+ accessToken: string;
32
+ printerId: string;
33
+ isQueue: boolean;
34
+ properties: PrinterProperties;
35
+ pollIntervalMs?: number;
36
+ }
37
+ /** Progress hooks so a UI can reflect the prepare/upload/job stages. */
38
+ export interface PrintJobHooks {
39
+ onPreparing?: (value: boolean) => void;
40
+ onUploading?: (value: boolean) => void;
41
+ onJobId?: (jobId: string) => void;
42
+ }
43
+ /**
44
+ * Upload one file then print it, waiting for the job to finish. Throws (with a
45
+ * message that includes "Hub printer driver error" for queue-driver failures) on
46
+ * any failure, so callers can aggregate per-file outcomes.
47
+ */
48
+ export declare function uploadAndPrintFile(ctx: PrintJobContext, file: File, hooks?: PrintJobHooks): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { /* PrinterProperties, */ PrinterConfig, PrinterProperties } from '../shared/types';
1
+ import { PrinterConfig, PrinterProperties, Printer, PrintResponse, JobStatusResponse, PrepareUploadResponse } from '../shared/types';
2
2
  export declare class EzpPrintService {
3
3
  constructor(redirectURI: string, clientID: string);
4
4
  clientID: string;
@@ -9,20 +9,21 @@ export declare class EzpPrintService {
9
9
  abortController: AbortController | null;
10
10
  private checkStoredRefreshToken;
11
11
  registerFetchInterceptor(): void;
12
- getPrinterList(accessToken: string): Promise<any>;
12
+ getPrinterList(accessToken: string): Promise<Printer[]>;
13
13
  getConfig(accessToken: string): Promise<Response>;
14
- getPrinterProperties(accessToken: string, printerID: string): Promise<any>;
15
- getAllPrinterProperties(accessToken: string): Promise<any>;
14
+ getPrinterProperties(accessToken: string, printerID: string): Promise<PrinterConfig[]>;
15
+ getAllPrinterProperties(accessToken: string): Promise<PrinterConfig[]>;
16
16
  printFileByUrl(accessToken: string, fileUrl: string, fileType: string, printerID: string, properties: PrinterProperties, filename?: string, printAndDelete?: boolean): Promise<Response>;
17
17
  abortPrint(): void;
18
- printByFileID(accessToken: string, fileID: string, fileType: string, printerID: string, properties: PrinterProperties, filename?: string, printAndDelete?: boolean): Promise<any>;
19
- prepareFileUpload(accessToken: string): Promise<any>;
20
- uploadFile(sasURI: string, formData: FormData): Promise<any>;
18
+ /** Shared POST to the `Print` endpoint. Returns the raw response. */
19
+ private printRequest;
20
+ printByFileID(accessToken: string, fileID: string, fileType: string, printerID: string, properties: PrinterProperties, filename?: string, printAndDelete?: boolean): Promise<PrintResponse>;
21
+ prepareFileUpload(accessToken: string): Promise<PrepareUploadResponse>;
21
22
  uploadBlobFiles(sasUri: string, file: File): Promise<import("@azure/storage-blob").BlobUploadCommonResponse>;
22
- getPrintStatus: () => Promise<any>;
23
+ getPrintStatus: () => Promise<JobStatusResponse>;
23
24
  }
24
25
  declare const printStore: import("@stencil/store").ObservableMap<{
25
- printers: any[];
26
+ printers: never[];
26
27
  jobID: string;
27
28
  printFinished: boolean;
28
29
  printApiHostUrl: string;
@@ -1,8 +1,19 @@
1
+ /**
2
+ * Shape of the `/v1/users/me` response that the UI actually reads. The API uses
3
+ * snake_case (`display_name`) — the only field consumed today. Indexed so other
4
+ * fields remain accessible without being individually typed.
5
+ */
6
+ export interface UserInfo {
7
+ display_name: string;
8
+ /** The user's account language (e.g. "en", "de") — used to sync the UI language. */
9
+ preferred_language?: string | null;
10
+ [key: string]: unknown;
11
+ }
1
12
  export declare class EzpUserService {
2
- getUserInfo(): Promise<any>;
13
+ getUserInfo(): Promise<UserInfo>;
3
14
  }
4
15
  declare const userStore: import("@stencil/store").ObservableMap<{
5
- user: any;
16
+ user: UserInfo | null;
6
17
  theme: string;
7
18
  appearance: string;
8
19
  }>;
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Centralised magic numbers used across the print/auth flow.
3
+ *
4
+ * These previously appeared as inline literals in `ezp-printer-selection`,
5
+ * `print.ts` and `utils.ts`, with the same job-status codes duplicated across
6
+ * three separate state machines. Keep them here so the meaning is explicit and
7
+ * there is a single source of truth.
8
+ */
9
+ /** Print-job status codes returned by `sfapi/Status`. */
10
+ export declare enum JobStatus {
11
+ Success = 0,
12
+ /** Job accepted / spooling — keep polling. */
13
+ Processing = 1246,
14
+ /** Job rendering — keep polling. */
15
+ Rendering = 129,
16
+ Failed = 3011,
17
+ /** Generic failure. */
18
+ Error = 2
19
+ }
20
+ /** Status codes that mean "still working — keep polling". */
21
+ export declare const PROCESSING_JOB_STATUSES: readonly number[];
22
+ /** Status codes that mean "terminal failure". */
23
+ export declare const FAILED_JOB_STATUSES: readonly number[];
24
+ /**
25
+ * Status/error codes that, for hub (queue) printers, indicate the print driver
26
+ * is missing or misconfigured rather than a transient failure. Surfaced to the
27
+ * user as a distinct "driver error" message.
28
+ */
29
+ export declare const HUB_DRIVER_ERROR_CODES: readonly number[];
30
+ /** `Print` response `code` meaning the upload expired and a fileid re-print is required. */
31
+ export declare const FILE_EXPIRED_STATUS = 412;
32
+ /** `Print` response `code` meaning the job was rejected outright. */
33
+ export declare const PRINT_REJECTED_CODE = 804;
34
+ /** Successful Azure Blob upload (`uploadData`) HTTP status. */
35
+ export declare const BLOB_UPLOAD_CREATED = 201;
36
+ /** Paper-format id that represents a custom (user-defined width/length) size. */
37
+ export declare const PAPER_ID = 256;
38
+ /** Print-status polling cadence and bounds. */
39
+ export declare const POLL_INTERVAL_MS = 2000;
40
+ /**
41
+ * Overall polling budget before a still-processing job is treated as failed.
42
+ * Prevents polling the status endpoint indefinitely on a stuck job (only hub
43
+ * printers had a timeout before). Generous — 10 minutes — to tolerate slow
44
+ * server-side rendering of large documents.
45
+ */
46
+ export declare const POLL_TIMEOUT_MS: number;
47
+ export declare const MAX_POLL_ATTEMPTS: number;
48
+ /** Fallback timeout for hub printers so the UI never hangs indefinitely. */
49
+ export declare const HUB_TIMEOUT_MS = 30000;
50
+ /** How often the access token is proactively refreshed, in seconds. */
51
+ export declare const TOKEN_REFRESH_INTERVAL_S = 1800;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Single typed entry point for the `localStorage` keys this library persists.
3
+ *
4
+ * Previously these keys were referenced as string literals in ~30 places across
5
+ * services and components, with inconsistent naming (`access_token` vs
6
+ * `refreshToken`). The literal key strings are preserved here exactly so that
7
+ * users who are already signed in keep their session across an upgrade.
8
+ */
9
+ import { PrinterProperties, Printer } from './types';
10
+ export declare const storage: {
11
+ getRefreshToken(): string | null;
12
+ setRefreshToken(token: string): void;
13
+ getIsAuthorized(): boolean;
14
+ setIsAuthorized(value: boolean): void;
15
+ hasIsAuthorized(): boolean;
16
+ getProperties(): PrinterProperties | null;
17
+ setProperties(properties: PrinterProperties): void;
18
+ getPrinter(): Printer | null;
19
+ setPrinter(printer: Printer): void;
20
+ /** Remove everything tied to the current session (used on logout). */
21
+ clearSession(): void;
22
+ /** Remove just the saved printer + its properties (used when the saved printer is gone). */
23
+ clearSavedPrinter(): void;
24
+ };
@@ -5,7 +5,9 @@ export type IconNameTypes =
5
5
  | 'checkmark-alt'
6
6
  | 'checkmark'
7
7
  | 'close'
8
+ | 'cloud-upload'
8
9
  | 'color'
10
+ | 'file'
9
11
  | 'copies'
10
12
  | 'dark'
11
13
  | 'drag-drop'
@@ -55,6 +57,37 @@ export type AppearanceTypes = 'system' | 'light' | 'dark'
55
57
  export type TriggerTypes = 'custom' | 'file' | 'button'
56
58
  export type AlertType = { open: boolean; heading: string; description: string }
57
59
  export type SystemAppearanceTypes = 'light' | 'dark'
60
+
61
+ /**
62
+ * Payload emitted by selection-style components (`ezp-select`, `ezp-input`,
63
+ * `ezp-stepper`) and consumed by `ezp-printer-selection.setSelectedProperties`.
64
+ */
65
+ export interface PropertyChangeDetail {
66
+ type: string
67
+ id?: string | number | boolean
68
+ title?: string
69
+ is_queue?: boolean
70
+ value?: string | number
71
+ }
72
+
73
+ /** Response of `sfapi/Print` (POST). */
74
+ export interface PrintResponse {
75
+ code?: number
76
+ jobid?: string
77
+ fileid?: string
78
+ }
79
+
80
+ /** Response of `sfapi/Status`. */
81
+ export interface JobStatusResponse {
82
+ jobstatus: number
83
+ jobstatusstring?: string
84
+ }
85
+
86
+ /** Response of `sfapi/PrepareUpload`. */
87
+ export interface PrepareUploadResponse {
88
+ fileid: string
89
+ sasUri: string
90
+ }
58
91
  export interface PrinterProperties {
59
92
  paper?: string
60
93
  paperid?: number | string
@@ -64,11 +97,11 @@ export interface PrinterProperties {
64
97
  orientation?: number | string
65
98
  copies?: number | string
66
99
  resolution?: string | number
67
- paperlength? : string | number
68
- paperwidth? : string | number
100
+ paperlength?: string | number
101
+ paperwidth?: string | number
69
102
  defaultSource?: number | string
70
- trayname?: string
71
- PageRanges? : string
103
+ trayname?: string
104
+ PageRanges?: string
72
105
  }
73
106
 
74
107
  export interface Printer {
@@ -87,8 +120,8 @@ export interface PaperFormat {
87
120
  }
88
121
 
89
122
  export interface Trays {
90
- Default : boolean
91
- Index: number
123
+ Default: boolean
124
+ Index: number
92
125
  Name: string
93
126
  }
94
127
 
@@ -101,7 +134,7 @@ export interface PrinterConfig {
101
134
  Resolution?: string
102
135
  Paper?: string
103
136
  Tray?: string
104
- },
137
+ }
105
138
  Collate?: boolean
106
139
  Color?: boolean
107
140
  ColorSupported?: boolean
@@ -123,7 +156,7 @@ export interface PrinterConfig {
123
156
  }
124
157
 
125
158
  export interface User {
126
- azureProfile: any
159
+ azureProfile: unknown
127
160
  dateJoined: string
128
161
  displayName: string
129
162
  email: string
@@ -137,5 +170,5 @@ export interface User {
137
170
  isVerfified: boolean
138
171
  lastName: string
139
172
  roles: Array<string>
140
- userInvitations: any
173
+ userInvitations: unknown
141
174
  }
@@ -1070,6 +1070,7 @@ export declare namespace JSXBase {
1070
1070
  importance?: 'low' | 'auto' | 'high';
1071
1071
  height?: number | string;
1072
1072
  loading?: 'lazy' | 'auto' | 'eager';
1073
+ referrerPolicy?: ReferrerPolicy;
1073
1074
  sizes?: string;
1074
1075
  src?: string;
1075
1076
  srcSet?: string;
@@ -0,0 +1,22 @@
1
+ import { PrinterConfig, PrinterProperties } from '../shared/types';
2
+ /**
3
+ * Derive the default print properties for a printer from its configuration.
4
+ *
5
+ * This logic previously lived inline and **duplicated verbatim** in
6
+ * `ezp-printer-selection` (in `setSelectedProperties` and `connectedCallback`).
7
+ * It mutates `properties` in place — matching the original behaviour exactly —
8
+ * and returns it for convenience.
9
+ */
10
+ export declare function applyPrinterDefaults(config: PrinterConfig, properties: PrinterProperties): PrinterProperties;
11
+ /** Does this printer config report an explicit "no usable trays" state? */
12
+ export declare function hasNoTrays(config: PrinterConfig): boolean;
13
+ /** Does this printer config expose at least one selectable tray? */
14
+ export declare function hasTrays(config: PrinterConfig): boolean;
15
+ export type JobOutcome = 'success' | 'processing' | 'failed' | 'hub-error';
16
+ /**
17
+ * Classify a print-job status code into a single outcome. Centralises the
18
+ * status logic that was previously duplicated (with slightly inconsistent code
19
+ * sets) across `validateData`, `waitForPrintCompletion` and the inline checks
20
+ * in `handlePrint`. Unknown codes are treated as failures for safety.
21
+ */
22
+ export declare function classifyJobStatus(jobstatus: number, isQueue: boolean): JobOutcome;
@@ -1,19 +1,31 @@
1
1
  import { PrinterProperties } from './../shared/types';
2
+ export { PAPER_ID } from '../shared/constants';
3
+ /**
4
+ * Re-render a Stencil component whenever the i18next language changes.
5
+ * i18next fires `languageChanged` but has no hook into Stencil's render cycle,
6
+ * so any component that calls `i18next.t()` in render() must force an update —
7
+ * otherwise a runtime language switch leaves already-mounted text stale.
8
+ * Call from connectedCallback and invoke the returned disposer in
9
+ * disconnectedCallback.
10
+ */
11
+ export declare function subscribeToLanguageChange(component: unknown): () => void;
2
12
  export declare function encodeFormData(data: {
3
13
  [x: string]: string | number | boolean;
4
14
  }): string;
5
15
  export declare function capitalize(string: string): string;
6
16
  export declare function initi18n(language?: string): void;
7
- export declare const poll: ({ fn, validate, interval, maxAttempts }: {
8
- fn: any;
9
- validate: any;
10
- interval: any;
11
- maxAttempts: any;
12
- }) => Promise<unknown>;
17
+ interface PollOptions<T> {
18
+ fn: () => Promise<T>;
19
+ validate: (result: T) => boolean;
20
+ interval: number;
21
+ maxAttempts: number;
22
+ }
23
+ export declare const poll: <T = any>({ fn, validate, interval, maxAttempts, }: PollOptions<T>) => Promise<T>;
13
24
  export declare const removeEmptyStrings: (obj: {
14
25
  [x: string]: any;
15
- }) => {};
26
+ }) => {
27
+ [key: string]: any;
28
+ };
16
29
  export declare const managePaperDimensions: (properties: PrinterProperties) => PrinterProperties;
17
- export declare const formatPageRange: (pageRange: any) => any;
18
- export declare const validatePageRange: (pageRange: any) => boolean;
19
- export declare const PAPER_ID = 256;
30
+ export declare const formatPageRange: (pageRange: string) => string;
31
+ export declare const validatePageRange: (pageRange: string) => boolean;