@ezeep/ezeep-js 1.0.294 → 1.0.306

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 (75) hide show
  1. package/dist/cjs/ezeep.cjs.js +1 -1
  2. package/dist/cjs/{ezp-auth_15.cjs.entry.js → ezp-auth_16.cjs.entry.js} +674 -110
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/collection/collection-manifest.json +1 -0
  5. package/dist/collection/components/ezp-file-name/ezp-file-name.css +98 -0
  6. package/dist/collection/components/ezp-file-name/ezp-file-name.js +411 -0
  7. package/dist/collection/components/ezp-icon/ezp-icon.js +1 -1
  8. package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +1 -1
  9. package/dist/collection/components/ezp-input/ezp-input.js +1 -1
  10. package/dist/collection/components/ezp-label/ezp-label.js +39 -1
  11. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +31 -3
  12. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +243 -90
  13. package/dist/collection/components/ezp-printing/ezp-printing.js +20 -2
  14. package/dist/collection/components/ezp-select/ezp-select.js +1 -1
  15. package/dist/collection/components/ezp-status/ezp-status.js +2 -2
  16. package/dist/collection/components/ezp-stepper/ezp-stepper.js +1 -1
  17. package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
  18. package/dist/collection/components/ezp-upload/ezp-upload.css +26 -1
  19. package/dist/collection/components/ezp-upload/ezp-upload.js +14 -3
  20. package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +1 -1
  21. package/dist/collection/shared/storage.js +39 -9
  22. package/dist/collection/types/shared/types.d.ts +2 -0
  23. package/dist/collection/utils/printer.js +75 -1
  24. package/dist/collection/utils/utils.js +29 -0
  25. package/dist/components/auth.js +1 -1
  26. package/dist/components/ezp-file-name.d.ts +11 -0
  27. package/dist/components/ezp-file-name.js +1 -0
  28. package/dist/components/ezp-file-name2.js +1 -0
  29. package/dist/components/ezp-icon-button2.js +1 -1
  30. package/dist/components/ezp-icon2.js +1 -1
  31. package/dist/components/ezp-input2.js +1 -1
  32. package/dist/components/ezp-label2.js +1 -1
  33. package/dist/components/ezp-printer-selection2.js +1 -1
  34. package/dist/components/ezp-printing.js +1 -1
  35. package/dist/components/ezp-select2.js +1 -1
  36. package/dist/components/ezp-status2.js +1 -1
  37. package/dist/components/ezp-stepper2.js +1 -1
  38. package/dist/components/ezp-text-button2.js +1 -1
  39. package/dist/components/ezp-upload2.js +1 -1
  40. package/dist/components/ezp-user-menu2.js +1 -1
  41. package/dist/components/utils.js +1 -1
  42. package/dist/directives/proxies.ts +38 -4
  43. package/dist/esm/ezeep.js +1 -1
  44. package/dist/esm/{ezp-auth_15.entry.js → ezp-auth_16.entry.js} +674 -111
  45. package/dist/esm/loader.js +1 -1
  46. package/dist/esm-es5/ezeep.js +1 -1
  47. package/dist/esm-es5/{ezp-auth_15.entry.js → ezp-auth_16.entry.js} +2 -2
  48. package/dist/esm-es5/loader.js +1 -1
  49. package/dist/ezeep/ezeep.esm.js +1 -1
  50. package/dist/ezeep/p-646c1d42.entry.js +1 -0
  51. package/dist/ezeep/p-8e2d88a9.system.entry.js +7 -0
  52. package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
  53. package/dist/ezeep/types/shared/types.d.ts +2 -0
  54. package/dist/types/components/ezp-file-name/ezp-file-name.d.ts +125 -0
  55. package/dist/types/components/ezp-label/ezp-label.d.ts +10 -0
  56. package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +48 -2
  57. package/dist/types/components/ezp-printing/ezp-printing.d.ts +9 -2
  58. package/dist/types/components/ezp-upload/ezp-upload.d.ts +4 -0
  59. package/dist/types/components.d.ts +82 -3
  60. package/dist/types/shared/storage.d.ts +18 -4
  61. package/dist/types/shared/types.d.ts +2 -0
  62. package/dist/types/utils/printer.d.ts +18 -0
  63. package/dist/types/utils/utils.d.ts +20 -1
  64. package/package.json +1 -1
  65. package/www/build/ezeep.esm.js +1 -1
  66. package/www/build/p-646c1d42.entry.js +1 -0
  67. package/www/build/p-70951744.js +1 -0
  68. package/www/build/p-8e2d88a9.system.entry.js +7 -0
  69. package/www/build/p-DCznw2Ee.system.js +1 -1
  70. package/www/index.html +1 -1
  71. package/dist/ezeep/p-3ab5a223.entry.js +0 -1
  72. package/dist/ezeep/p-fe700ca4.system.entry.js +0 -7
  73. package/www/build/p-3ab5a223.entry.js +0 -1
  74. package/www/build/p-65242d5e.js +0 -1
  75. package/www/build/p-fe700ca4.system.entry.js +0 -7
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function l(e){try{o(i.next(e))}catch(e){a(e)}}function s(e){try{o(i["throw"](e))}catch(e){a(e)}}function o(e){e.done?n(e.value):r(e.value).then(l,s)}o((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,l=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return l.next=s(0),l["throw"]=s(1),l["return"]=s(2),typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return o([e,t])}}function o(s){if(i)throw new TypeError("Generator is already executing.");while(l&&(l=0,s[0]&&(n=0)),n)try{if(i=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-CYpousxy.system.js","./p-D4aCr1OK.system.js"],(function(e,t){"use strict";var n,i,r,a,l,s,o,c;return{setters:[function(t){n=t.p;i=t.B;r=t.c;a=t.w;l=t.N;s=t.H;o=t.b;e("setNonce",t.s)},function(e){c=e.g}],execute:function(){var e=this;var u=function(){if(i.isDev&&!i.isTesting){r("Running in development mode.")}if(i.cloneNodeFix){p(s.prototype)}var e=i.scriptDataOpts?a.document&&Array.from(a.document.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(l,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===l})):null;var o=t.meta.url;var c=i.scriptDataOpts?(e||{})["data-opts"]||{}:{};if(o!==""){c.resourcesUrl=new URL(".",o).href}return n(c)};var p=function(e){var t=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return t.call(this,e)}var n=t.call(this,false);var i=this.childNodes;if(e){for(var r=0;r<i.length;r++){if(i[r].nodeType!==2){n.appendChild(i[r].cloneNode(true))}}}return n}};u().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:e.sent();return[2,o([["p-fe700ca4.system",[[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}],[1,"ezp-printer-selection",{clientID:[1,"client-i-d"],redirectURI:[1,"redirect-u-r-i"],filename:[1025],fileurl:[1],filetype:[1025],fileid:[1025],files:[16],hidemenu:[4],hideheader:[4],seamless:[4],loading:[32],printProcessing:[32],pageRangeInvalid:[32],uploading:[32],preparingUpload:[32],printSuccess:[32],printFailed:[32],printTimedOut:[32],notSupported:[32],noPrinters:[32],hubDriverError:[32],userMenuOpen:[32],printStopped:[32],userName:[32],printers:[32],selectedPrinter:[32],printerConfig:[32],selectedPrinterConfig:[32],selectedProperties:[32],paperid:[32],currentFileIndex:[32],totalFiles:[32],failedFiles:[32],successfulFiles:[32],partialSuccess:[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{selectedFiles:[32],dragging:[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{heading:[1],description:[1],action:[1],iconName:[1,"icon-name"],iconSize:[1,"icon-size"],iconFramed:[4,"icon-framed"],instance:[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{name:[1],open:[1028]},null,{open:[{watchOpen:0}]}],[1,"ezp-select",{icon:[1],label:[1],optionFlow:[1,"option-flow"],options:[16],placeholder:[1],preSelected:[8,"pre-selected"],toggleFlow:[1,"toggle-flow"],disabled:[4],expanded:[32],selected:[32]},null,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}],[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}],[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},null,{value:[{watchValue:0}]}],[1,"ezp-status",{description:[1],subtext:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}],[1,"ezp-backdrop",{visible:[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{blank:[4],disabled:[4],href:[1],icon:[1],level:[1],type:[1]}],[1,"ezp-text-button",{blank:[4],disabled:[4],href:[1],level:[1],label:[1],type:[1],small:[4]}],[1,"ezp-icon",{name:[1],size:[1],framed:[4]}],[1,"ezp-label",{ellipsis:[4],level:[1],noWrap:[4,"no-wrap"],text:[1],weight:[1]}]]]],t)]}}))}))}))}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function l(e){try{o(i.next(e))}catch(e){a(e)}}function s(e){try{o(i["throw"](e))}catch(e){a(e)}}function o(e){e.done?n(e.value):r(e.value).then(l,s)}o((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,l=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return l.next=s(0),l["throw"]=s(1),l["return"]=s(2),typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return o([e,t])}}function o(s){if(i)throw new TypeError("Generator is already executing.");while(l&&(l=0,s[0]&&(n=0)),n)try{if(i=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-CYpousxy.system.js","./p-D4aCr1OK.system.js"],(function(e,t){"use strict";var n,i,r,a,l,s,o,c;return{setters:[function(t){n=t.p;i=t.B;r=t.c;a=t.w;l=t.N;s=t.H;o=t.b;e("setNonce",t.s)},function(e){c=e.g}],execute:function(){var e=this;var u=function(){if(i.isDev&&!i.isTesting){r("Running in development mode.")}if(i.cloneNodeFix){p(s.prototype)}var e=i.scriptDataOpts?a.document&&Array.from(a.document.querySelectorAll("script")).find((function(e){return new RegExp("/".concat(l,"(\\.esm)?\\.js($|\\?|#)")).test(e.src)||e.getAttribute("data-stencil-namespace")===l})):null;var o=t.meta.url;var c=i.scriptDataOpts?(e||{})["data-opts"]||{}:{};if(o!==""){c.resourcesUrl=new URL(".",o).href}return n(c)};var p=function(e){var t=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return t.call(this,e)}var n=t.call(this,false);var i=this.childNodes;if(e){for(var r=0;r<i.length;r++){if(i[r].nodeType!==2){n.appendChild(i[r].cloneNode(true))}}}return n}};u().then((function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,c()];case 1:e.sent();return[2,o([["p-8e2d88a9.system",[[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}],[1,"ezp-printer-selection",{clientID:[1,"client-i-d"],redirectURI:[1,"redirect-u-r-i"],filename:[1025],fileurl:[1],filetype:[1025],fileid:[1025],files:[16],hidemenu:[4],hideheader:[4],seamless:[4],loading:[32],printProcessing:[32],pageRangeInvalid:[32],uploading:[32],preparingUpload:[32],printSuccess:[32],printFailed:[32],printTimedOut:[32],notSupported:[32],noPrinters:[32],hubDriverError:[32],userMenuOpen:[32],printStopped:[32],firstVisibleFile:[32],userName:[32],printers:[32],selectedPrinter:[32],printerConfig:[32],selectedPrinterConfig:[32],selectedProperties:[32],loadingPrinterConfig:[32],paperid:[32],currentFileIndex:[32],totalFiles:[32],failedFiles:[32],successfulFiles:[32],partialSuccess:[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{selectedFiles:[32],dragging:[32],firstVisibleFile:[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{heading:[1],description:[1],action:[1],iconName:[1,"icon-name"],iconSize:[1,"icon-size"],iconFramed:[4,"icon-framed"],instance:[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{name:[1],open:[1028]},null,{open:[{watchOpen:0}]}],[1,"ezp-select",{icon:[1],label:[1],optionFlow:[1,"option-flow"],options:[16],placeholder:[1],preSelected:[8,"pre-selected"],toggleFlow:[1,"toggle-flow"],disabled:[4],expanded:[32],selected:[32]},null,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}],[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}],[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},null,{value:[{watchValue:0}]}],[1,"ezp-status",{description:[1],subtext:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}],[1,"ezp-file-name",{name:[1],level:[1],weight:[1],placement:[1],anchor:[1],expanded:[32],tooltipOpen:[32]},[[10,"keydown","handleKeyDown"]],{tooltipOpen:[{watchTooltipOpen:0}]}],[1,"ezp-backdrop",{visible:[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{blank:[4],disabled:[4],href:[1],icon:[1],level:[1],type:[1]}],[1,"ezp-text-button",{blank:[4],disabled:[4],href:[1],level:[1],label:[1],type:[1],small:[4]}],[1,"ezp-icon",{name:[1],size:[1],framed:[4]}],[1,"ezp-label",{ellipsis:[4],level:[1],noWrap:[4,"no-wrap"],text:[1],weight:[1],isTruncated:[64]}]]]],t)]}}))}))}))}}}));
@@ -52,6 +52,8 @@ export type TextButtonLevelTypes = 'primary' | 'secondary' | 'tertiary'
52
52
  export type TextButtonTypeTypes = 'button'
53
53
  export type LabelLevelTypes = 'primary' | 'secondary' | 'tertiary'
54
54
  export type WeightTypes = 'soft' | 'strong' | 'heavy'
55
+ export type TooltipPlacementTypes = 'top' | 'bottom'
56
+ export type TooltipAnchorTypes = 'container' | 'parent'
55
57
  export type ThemeTypes = 'pink' | 'red' | 'orange' | 'green' | 'teal' | 'cyan' | 'blue' | 'violet'
56
58
  export type AppearanceTypes = 'system' | 'light' | 'dark'
57
59
  export type TriggerTypes = 'custom' | 'file' | 'button'
@@ -0,0 +1,125 @@
1
+ import { LabelLevelTypes, TooltipAnchorTypes, TooltipPlacementTypes, WeightTypes } from '../../shared/types';
2
+ export declare class EzpFileName {
3
+ host: HTMLEzpFileNameElement;
4
+ private openTimeout?;
5
+ private closeTimeout?;
6
+ /** Invalidates an in-flight open when the pointer leaves. */
7
+ private openGeneration;
8
+ /** Everything the open tooltip listens to for scrolling, to detach on close. */
9
+ private scrollTargets;
10
+ /**
11
+ *
12
+ * Properties
13
+ *
14
+ */
15
+ /** The full file name. Always present in the DOM, so screen readers and
16
+ * copy-paste get it in full however it is truncated on screen. */
17
+ name: string;
18
+ /** Type scale of the rendered name, passed through to `ezp-label`. */
19
+ level: LabelLevelTypes;
20
+ /** Font weight of the rendered name, passed through to `ezp-label`. */
21
+ weight: WeightTypes;
22
+ /** Side the tooltip opens on. Consumers point it away from the edge their
23
+ * row sits against — `bottom` for the first row of a list, `top` below it. */
24
+ placement: TooltipPlacementTypes;
25
+ /** What the tooltip is placed against.
26
+ *
27
+ * `container`: the nearest positioned ancestor, by CSS alone. The consumer
28
+ * makes the row that ancestor, and the bubble opens at the row's edge.
29
+ *
30
+ * `parent`: the row the name sits in, measured when the tooltip opens — the
31
+ * closest ancestor marked `data-tooltip-row`, or else the name's parent
32
+ * element. For rows inside a scroll container, which would clip a bubble
33
+ * anchored to the row. The consumer puts the positioned ancestor outside the
34
+ * scroller instead, and the bubble spans that ancestor but lines up with
35
+ * the row. */
36
+ anchor: TooltipAnchorTypes;
37
+ /**
38
+ *
39
+ * States
40
+ *
41
+ */
42
+ /** Set by tapping the name: shows it in full, wrapped over several lines.
43
+ * This is the touch counterpart of the tooltip, which needs a pointer. */
44
+ expanded: boolean;
45
+ tooltipOpen: boolean;
46
+ /**
47
+ *
48
+ * Lifecycle methods
49
+ *
50
+ */
51
+ disconnectedCallback(): void;
52
+ componentDidRender(): void;
53
+ /**
54
+ *
55
+ * Watchers
56
+ *
57
+ */
58
+ /** A measured bubble stays where it was put, so once the row scrolls away
59
+ * under it, it would point at the wrong name. Closing it is the honest fix. */
60
+ watchTooltipOpen(open: boolean): void;
61
+ /**
62
+ *
63
+ * Listeners
64
+ *
65
+ */
66
+ /**
67
+ * Escape dismisses the tooltip, and only the tooltip.
68
+ *
69
+ * Listening globally catches the key however the tooltip was opened,
70
+ * including by hover, when nothing here has focus. It has to run in the
71
+ * capture phase: stopping propagation on the way back up happens after every
72
+ * ancestor has already seen the key, so a host app that closes its dialog on
73
+ * Escape would close it as the tooltip was dismissed.
74
+ *
75
+ * `window` rather than `document`, because dialog libraries capture on the
76
+ * document themselves — Radix's `DismissableLayer` does — and register before
77
+ * a component mounted inside them, so they would still see the key first.
78
+ * Capture runs window before document, so this transient layer consumes the
79
+ * key first, and only while it is actually open.
80
+ */
81
+ handleKeyDown(event: KeyboardEvent): void;
82
+ /**
83
+ *
84
+ * Private methods
85
+ *
86
+ */
87
+ /** Tooltips need a pointer; touch devices get the tap-to-expand path instead.
88
+ * Tapping fires a synthetic `mouseenter` in most mobile browsers, so without
89
+ * this check a tooltip would open on every tap. */
90
+ private get hasHover();
91
+ /** Whether anything is actually hidden. A name that fits needs no tooltip —
92
+ * repeating text the reader can already see is just noise in the way. */
93
+ private isClipped;
94
+ private openTooltip;
95
+ private closeTooltip;
96
+ /** Lines the bubble up with the row the name sits in. Its containing block
97
+ * is somewhere further out, so `top: 0` shows where that block starts, and
98
+ * the offset is taken from there. Measurements are in screen pixels, which
99
+ * differ from CSS pixels when a host scales the dialog with a transform, so
100
+ * the offset is converted back before it is applied.
101
+ *
102
+ * `placement` is a preference here: a row near the edge of whatever clips
103
+ * the bubble may not have room on that side, so it opens on the other. */
104
+ private placeTooltip;
105
+ /** The part of the screen the bubble can show in: the viewport, narrowed by
106
+ * every ancestor of its containing block that clips overflow — the host's
107
+ * scrolling body, say. The scroller the rows sit in isn't among them, as the
108
+ * bubble is anchored beyond it. */
109
+ private visibleArea;
110
+ /** Scroll events don't bubble, so every ancestor is listened to directly —
111
+ * across shadow roots, since the scroll container is usually the consumer's.
112
+ * A window resize re-wraps the bubble just the same, so it closes it too. */
113
+ private watchScroll;
114
+ private stopWatchingScroll;
115
+ /** Leaves the tooltip up briefly so the pointer can reach it. */
116
+ private scheduleClose;
117
+ private cancelScheduledClose;
118
+ private toggleExpanded;
119
+ /**
120
+ *
121
+ * Render method
122
+ *
123
+ */
124
+ render(): any;
125
+ }
@@ -1,5 +1,15 @@
1
1
  import { LabelLevelTypes, WeightTypes } from '../../shared/types';
2
2
  export declare class EzpLabel {
3
+ host: HTMLEzpLabelElement;
4
+ /**
5
+ *
6
+ * Public methods
7
+ *
8
+ */
9
+ /** Whether the text is currently clipped — `ellipsis` only bites when the
10
+ * text outgrows the space it was given, which callers cannot tell from the
11
+ * props alone. Lets a caller offer the full text only when it is needed. */
12
+ isTruncated(): Promise<boolean>;
3
13
  /**
4
14
  *
5
15
  * Properties
@@ -46,12 +46,19 @@ export declare class EzpPrinterSelection {
46
46
  hubDriverError: boolean;
47
47
  userMenuOpen: boolean;
48
48
  printStopped: boolean;
49
+ /** First row of the file list that is at least partly in view. Its tooltip
50
+ * opens downwards, as there is no list left above it to cover. */
51
+ firstVisibleFile: number;
49
52
  userName: string;
53
+ /** Starts empty so the dialog can still render if the list never arrives. */
50
54
  printers: Printer[];
55
+ /** Starts empty so the dialog renders even if the list never loads. */
51
56
  selectedPrinter: Printer;
52
57
  printerConfig: PrinterConfig[];
53
58
  selectedPrinterConfig: PrinterConfig;
54
59
  selectedProperties: PrinterProperties;
60
+ /** True while a printer's capabilities are being fetched. */
61
+ loadingPrinterConfig: boolean;
55
62
  paperid: number | string | undefined;
56
63
  currentFileIndex: number;
57
64
  totalFiles: number;
@@ -65,6 +72,10 @@ export declare class EzpPrinterSelection {
65
72
  */
66
73
  /** Description... */
67
74
  printCancel: EventEmitter<MouseEvent>;
75
+ /** Cancel or close on this dialog: the user backs out of the print options
76
+ * only. Unlike `printCancel`, it leaves the selected files alone, so the
77
+ * host can return to the step they were chosen on. */
78
+ printDismiss: EventEmitter<void>;
68
79
  /** Description... */
69
80
  printSubmit: EventEmitter<MouseEvent>;
70
81
  logout: EventEmitter<MouseEvent>;
@@ -90,18 +101,44 @@ export declare class EzpPrinterSelection {
90
101
  private handleCancel;
91
102
  /** Poll `validate` callback: maps a job status to component state, returns `true` to stop polling. */
92
103
  private validateData;
93
- /** Print needs a printer, no job in flight and a valid page range. */
104
+ /** Print needs a printer with its capabilities in hand, no job in flight and
105
+ * a valid page range. The config matters: between picking a printer and its
106
+ * properties arriving, the selection is set but the properties still hold
107
+ * blank defaults, and printing then saves those as that printer's settings. */
94
108
  private get printDisabled();
95
109
  /** Description... */
96
110
  private handlePrint;
111
+ /** Keep this printer and its settings for the next print. Stored per printer,
112
+ * so each one keeps its own and no setting follows the user to a printer
113
+ * that cannot do it. */
114
+ private rememberSelection;
97
115
  private handleUserMenu;
98
- private getPropertiesFromLocalStorage;
116
+ private handleFilesScroll;
117
+ /**
118
+ * Decide which printer the dialog opens on: the one last printed to, or the
119
+ * user's only printer when there is nothing to choose between. Its settings
120
+ * follow once its config is in, since they can only be validated against the
121
+ * printer's capabilities.
122
+ */
123
+ private selectInitialPrinter;
99
124
  private setPaperid;
100
125
  private getUserInfo;
101
126
  private setSelectedProperties;
102
127
  /** Upload + print a single file, reflecting progress into component state. */
103
128
  private processSingleFile;
104
129
  private validateFileType;
130
+ /**
131
+ * What a dropdown should show: the current selection — restored from the last
132
+ * print, or just made by the user — and otherwise the printer's own default.
133
+ *
134
+ * The fallbacks matter because a config may describe its default only by name
135
+ * (`Default.Duplex`, `Default.Paper`, `Default.Tray`) without flagging the
136
+ * matching entry, which is all these dropdowns had to go on before settings
137
+ * were remembered.
138
+ */
139
+ private duplexPreSelection;
140
+ private paperPreSelection;
141
+ private trayPreSelection;
105
142
  setDefaultPaperFormat(): void;
106
143
  private processMultipleFiles;
107
144
  /**
@@ -111,6 +148,15 @@ export declare class EzpPrinterSelection {
111
148
  */
112
149
  /** Description... */
113
150
  connectedCallback(): Promise<void>;
151
+ /**
152
+ * Fetch the selected printer's capabilities and restore its saved settings.
153
+ *
154
+ * A failure drops the selection rather than keeping a printer the dialog
155
+ * cannot describe: the options would stay disabled while Print stayed
156
+ * enabled, so the job would go out with properties nothing has verified.
157
+ * With no selection the user picks from the list, which fetches again.
158
+ */
159
+ private loadSelectedPrinterConfig;
114
160
  disconnectedCallback(): void;
115
161
  /**
116
162
  *
@@ -51,6 +51,11 @@ export declare class EzpPrinting {
51
51
  */
52
52
  /** Description... */
53
53
  listenPrintCancel(): void;
54
+ /** Cancel or close on the print options card. With an upload step to go
55
+ * back to, only the card closes: the files picked there stay picked, and
56
+ * removing them is the upload card's "Clear files". Without one there is
57
+ * nothing left to show, so it ends the flow like `printCancel`. */
58
+ listenPrintDismiss(): void;
54
59
  /** Description... */
55
60
  listenPrintSubmit(): void;
56
61
  /** Description... */
@@ -68,8 +73,10 @@ export declare class EzpPrinting {
68
73
  /**
69
74
  * Fired when the print flow reaches an end state and the host may dismiss the
70
75
  * component: a print job was submitted, or the user cancelled on the upload
71
- * card, the sign-in dialog (with files pending) or the print options card. It
72
- * does not mean a job was printed — check for that on the print API side.
76
+ * card, the sign-in dialog (with files pending) or the print options card. A
77
+ * cancel on the print options card returns to the upload card when there is
78
+ * one (`trigger="file"`), so it doesn't end the flow there. It does not mean
79
+ * a job was printed — check for that on the print API side.
73
80
  */
74
81
  printFinished: EventEmitter<void>;
75
82
  /**
@@ -12,6 +12,9 @@ export declare class EzpUpload {
12
12
  */
13
13
  selectedFiles: File[];
14
14
  dragging: boolean;
15
+ /** First row of the file list that is at least partly in view. Its tooltip
16
+ * opens downwards, as there is no list left above it to cover. */
17
+ firstVisibleFile: number;
15
18
  /**
16
19
  *
17
20
  * Events
@@ -48,6 +51,7 @@ export declare class EzpUpload {
48
51
  private handleInput;
49
52
  private removeFile;
50
53
  private handleCancel;
54
+ private handleFilesScroll;
51
55
  private handleContinue;
52
56
  /** Extract a short, upper-cased file-type label from the file name. */
53
57
  private fileType;
@@ -5,8 +5,8 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { AppearanceTypes, IconButtonLevelTypes, IconButtonTypeTypes, IconNameTypes, IconSizeTypes, LabelLevelTypes, SelectFlowTypes, SelectOptionType, TextButtonLevelTypes, TextButtonTypeTypes, ThemeTypes, TriggerTypes, WeightTypes } from "./shared/types";
9
- export { AppearanceTypes, IconButtonLevelTypes, IconButtonTypeTypes, IconNameTypes, IconSizeTypes, LabelLevelTypes, SelectFlowTypes, SelectOptionType, TextButtonLevelTypes, TextButtonTypeTypes, ThemeTypes, TriggerTypes, WeightTypes } from "./shared/types";
8
+ import { AppearanceTypes, IconButtonLevelTypes, IconButtonTypeTypes, IconNameTypes, IconSizeTypes, LabelLevelTypes, SelectFlowTypes, SelectOptionType, TextButtonLevelTypes, TextButtonTypeTypes, ThemeTypes, TooltipAnchorTypes, TooltipPlacementTypes, TriggerTypes, WeightTypes } from "./shared/types";
9
+ export { AppearanceTypes, IconButtonLevelTypes, IconButtonTypeTypes, IconNameTypes, IconSizeTypes, LabelLevelTypes, SelectFlowTypes, SelectOptionType, TextButtonLevelTypes, TextButtonTypeTypes, ThemeTypes, TooltipAnchorTypes, TooltipPlacementTypes, TriggerTypes, WeightTypes } from "./shared/types";
10
10
  export namespace Components {
11
11
  interface EzpAuth {
12
12
  "clientID": string;
@@ -42,6 +42,33 @@ export namespace Components {
42
42
  "iconSize": IconSizeTypes;
43
43
  "instance": string;
44
44
  }
45
+ interface EzpFileName {
46
+ /**
47
+ * What the tooltip is placed against. `container`: the nearest positioned ancestor, by CSS alone. The consumer makes the row that ancestor, and the bubble opens at the row's edge. `parent`: the row the name sits in, measured when the tooltip opens — the closest ancestor marked `data-tooltip-row`, or else the name's parent element. For rows inside a scroll container, which would clip a bubble anchored to the row. The consumer puts the positioned ancestor outside the scroller instead, and the bubble spans that ancestor but lines up with the row.
48
+ * @default 'container'
49
+ */
50
+ "anchor": TooltipAnchorTypes;
51
+ /**
52
+ * Type scale of the rendered name, passed through to `ezp-label`.
53
+ * @default 'secondary'
54
+ */
55
+ "level": LabelLevelTypes;
56
+ /**
57
+ * The full file name. Always present in the DOM, so screen readers and copy-paste get it in full however it is truncated on screen.
58
+ * @default ''
59
+ */
60
+ "name": string;
61
+ /**
62
+ * Side the tooltip opens on. Consumers point it away from the edge their row sits against — `bottom` for the first row of a list, `top` below it.
63
+ * @default 'top'
64
+ */
65
+ "placement": TooltipPlacementTypes;
66
+ /**
67
+ * Font weight of the rendered name, passed through to `ezp-label`.
68
+ * @default 'soft'
69
+ */
70
+ "weight": WeightTypes;
71
+ }
45
72
  interface EzpIcon {
46
73
  /**
47
74
  * Description...
@@ -126,6 +153,10 @@ export namespace Components {
126
153
  * @default false
127
154
  */
128
155
  "ellipsis": boolean;
156
+ /**
157
+ * Whether the text is currently clipped — `ellipsis` only bites when the text outgrows the space it was given, which callers cannot tell from the props alone. Lets a caller offer the full text only when it is needed.
158
+ */
159
+ "isTruncated": () => Promise<boolean>;
129
160
  /**
130
161
  * Description...
131
162
  * @default 'secondary'
@@ -441,6 +472,12 @@ declare global {
441
472
  prototype: HTMLEzpDialogElement;
442
473
  new (): HTMLEzpDialogElement;
443
474
  };
475
+ interface HTMLEzpFileNameElement extends Components.EzpFileName, HTMLStencilElement {
476
+ }
477
+ var HTMLEzpFileNameElement: {
478
+ prototype: HTMLEzpFileNameElement;
479
+ new (): HTMLEzpFileNameElement;
480
+ };
444
481
  interface HTMLEzpIconElement extends Components.EzpIcon, HTMLStencilElement {
445
482
  }
446
483
  var HTMLEzpIconElement: {
@@ -478,6 +515,7 @@ declare global {
478
515
  };
479
516
  interface HTMLEzpPrinterSelectionElementEventMap {
480
517
  "printCancel": MouseEvent;
518
+ "printDismiss": void;
481
519
  "printSubmit": MouseEvent;
482
520
  "logout": MouseEvent;
483
521
  }
@@ -613,6 +651,7 @@ declare global {
613
651
  "ezp-auth": HTMLEzpAuthElement;
614
652
  "ezp-backdrop": HTMLEzpBackdropElement;
615
653
  "ezp-dialog": HTMLEzpDialogElement;
654
+ "ezp-file-name": HTMLEzpFileNameElement;
616
655
  "ezp-icon": HTMLEzpIconElement;
617
656
  "ezp-icon-button": HTMLEzpIconButtonElement;
618
657
  "ezp-input": HTMLEzpInputElement;
@@ -674,6 +713,33 @@ declare namespace LocalJSX {
674
713
  */
675
714
  "onDialogClose"?: (event: EzpDialogCustomEvent<string>) => void;
676
715
  }
716
+ interface EzpFileName {
717
+ /**
718
+ * What the tooltip is placed against. `container`: the nearest positioned ancestor, by CSS alone. The consumer makes the row that ancestor, and the bubble opens at the row's edge. `parent`: the row the name sits in, measured when the tooltip opens — the closest ancestor marked `data-tooltip-row`, or else the name's parent element. For rows inside a scroll container, which would clip a bubble anchored to the row. The consumer puts the positioned ancestor outside the scroller instead, and the bubble spans that ancestor but lines up with the row.
719
+ * @default 'container'
720
+ */
721
+ "anchor"?: TooltipAnchorTypes;
722
+ /**
723
+ * Type scale of the rendered name, passed through to `ezp-label`.
724
+ * @default 'secondary'
725
+ */
726
+ "level"?: LabelLevelTypes;
727
+ /**
728
+ * The full file name. Always present in the DOM, so screen readers and copy-paste get it in full however it is truncated on screen.
729
+ * @default ''
730
+ */
731
+ "name"?: string;
732
+ /**
733
+ * Side the tooltip opens on. Consumers point it away from the edge their row sits against — `bottom` for the first row of a list, `top` below it.
734
+ * @default 'top'
735
+ */
736
+ "placement"?: TooltipPlacementTypes;
737
+ /**
738
+ * Font weight of the rendered name, passed through to `ezp-label`.
739
+ * @default 'soft'
740
+ */
741
+ "weight"?: WeightTypes;
742
+ }
677
743
  interface EzpIcon {
678
744
  /**
679
745
  * Description...
@@ -806,6 +872,10 @@ declare namespace LocalJSX {
806
872
  * Description...
807
873
  */
808
874
  "onPrintCancel"?: (event: EzpPrinterSelectionCustomEvent<MouseEvent>) => void;
875
+ /**
876
+ * Cancel or close on this dialog: the user backs out of the print options only. Unlike `printCancel`, it leaves the selected files alone, so the host can return to the step they were chosen on.
877
+ */
878
+ "onPrintDismiss"?: (event: EzpPrinterSelectionCustomEvent<void>) => void;
809
879
  /**
810
880
  * Description...
811
881
  */
@@ -844,7 +914,7 @@ declare namespace LocalJSX {
844
914
  */
845
915
  "language"?: string;
846
916
  /**
847
- * Fired when the print flow reaches an end state and the host may dismiss the component: a print job was submitted, or the user cancelled on the upload card, the sign-in dialog (with files pending) or the print options card. It does not mean a job was printed — check for that on the print API side.
917
+ * Fired when the print flow reaches an end state and the host may dismiss the component: a print job was submitted, or the user cancelled on the upload card, the sign-in dialog (with files pending) or the print options card. A cancel on the print options card returns to the upload card when there is one (`trigger="file"`), so it doesn't end the flow there. It does not mean a job was printed — check for that on the print API side.
848
918
  */
849
919
  "onPrintFinished"?: (event: EzpPrintingCustomEvent<void>) => void;
850
920
  "printapihosturl"?: string;
@@ -1032,6 +1102,13 @@ declare namespace LocalJSX {
1032
1102
  "iconFramed": boolean;
1033
1103
  "instance": string;
1034
1104
  }
1105
+ interface EzpFileNameAttributes {
1106
+ "name": string;
1107
+ "level": LabelLevelTypes;
1108
+ "weight": WeightTypes;
1109
+ "placement": TooltipPlacementTypes;
1110
+ "anchor": TooltipAnchorTypes;
1111
+ }
1035
1112
  interface EzpIconAttributes {
1036
1113
  "name": IconNameTypes;
1037
1114
  "size": IconSizeTypes;
@@ -1136,6 +1213,7 @@ declare namespace LocalJSX {
1136
1213
  "ezp-auth": Omit<EzpAuth, keyof EzpAuthAttributes> & { [K in keyof EzpAuth & keyof EzpAuthAttributes]?: EzpAuth[K] } & { [K in keyof EzpAuth & keyof EzpAuthAttributes as `attr:${K}`]?: EzpAuthAttributes[K] } & { [K in keyof EzpAuth & keyof EzpAuthAttributes as `prop:${K}`]?: EzpAuth[K] };
1137
1214
  "ezp-backdrop": Omit<EzpBackdrop, keyof EzpBackdropAttributes> & { [K in keyof EzpBackdrop & keyof EzpBackdropAttributes]?: EzpBackdrop[K] } & { [K in keyof EzpBackdrop & keyof EzpBackdropAttributes as `attr:${K}`]?: EzpBackdropAttributes[K] } & { [K in keyof EzpBackdrop & keyof EzpBackdropAttributes as `prop:${K}`]?: EzpBackdrop[K] };
1138
1215
  "ezp-dialog": Omit<EzpDialog, keyof EzpDialogAttributes> & { [K in keyof EzpDialog & keyof EzpDialogAttributes]?: EzpDialog[K] } & { [K in keyof EzpDialog & keyof EzpDialogAttributes as `attr:${K}`]?: EzpDialogAttributes[K] } & { [K in keyof EzpDialog & keyof EzpDialogAttributes as `prop:${K}`]?: EzpDialog[K] };
1216
+ "ezp-file-name": Omit<EzpFileName, keyof EzpFileNameAttributes> & { [K in keyof EzpFileName & keyof EzpFileNameAttributes]?: EzpFileName[K] } & { [K in keyof EzpFileName & keyof EzpFileNameAttributes as `attr:${K}`]?: EzpFileNameAttributes[K] } & { [K in keyof EzpFileName & keyof EzpFileNameAttributes as `prop:${K}`]?: EzpFileName[K] };
1139
1217
  "ezp-icon": Omit<EzpIcon, keyof EzpIconAttributes> & { [K in keyof EzpIcon & keyof EzpIconAttributes]?: EzpIcon[K] } & { [K in keyof EzpIcon & keyof EzpIconAttributes as `attr:${K}`]?: EzpIconAttributes[K] } & { [K in keyof EzpIcon & keyof EzpIconAttributes as `prop:${K}`]?: EzpIcon[K] } & OneOf<"name", EzpIcon["name"], EzpIconAttributes["name"]>;
1140
1218
  "ezp-icon-button": Omit<EzpIconButton, keyof EzpIconButtonAttributes> & { [K in keyof EzpIconButton & keyof EzpIconButtonAttributes]?: EzpIconButton[K] } & { [K in keyof EzpIconButton & keyof EzpIconButtonAttributes as `attr:${K}`]?: EzpIconButtonAttributes[K] } & { [K in keyof EzpIconButton & keyof EzpIconButtonAttributes as `prop:${K}`]?: EzpIconButton[K] } & OneOf<"icon", EzpIconButton["icon"], EzpIconButtonAttributes["icon"]>;
1141
1219
  "ezp-input": Omit<EzpInput, keyof EzpInputAttributes> & { [K in keyof EzpInput & keyof EzpInputAttributes]?: EzpInput[K] } & { [K in keyof EzpInput & keyof EzpInputAttributes as `attr:${K}`]?: EzpInputAttributes[K] } & { [K in keyof EzpInput & keyof EzpInputAttributes as `prop:${K}`]?: EzpInput[K] };
@@ -1157,6 +1235,7 @@ declare module "@stencil/core" {
1157
1235
  "ezp-auth": LocalJSX.IntrinsicElements["ezp-auth"] & JSXBase.HTMLAttributes<HTMLEzpAuthElement>;
1158
1236
  "ezp-backdrop": LocalJSX.IntrinsicElements["ezp-backdrop"] & JSXBase.HTMLAttributes<HTMLEzpBackdropElement>;
1159
1237
  "ezp-dialog": LocalJSX.IntrinsicElements["ezp-dialog"] & JSXBase.HTMLAttributes<HTMLEzpDialogElement>;
1238
+ "ezp-file-name": LocalJSX.IntrinsicElements["ezp-file-name"] & JSXBase.HTMLAttributes<HTMLEzpFileNameElement>;
1160
1239
  "ezp-icon": LocalJSX.IntrinsicElements["ezp-icon"] & JSXBase.HTMLAttributes<HTMLEzpIconElement>;
1161
1240
  "ezp-icon-button": LocalJSX.IntrinsicElements["ezp-icon-button"] & JSXBase.HTMLAttributes<HTMLEzpIconButtonElement>;
1162
1241
  "ezp-input": LocalJSX.IntrinsicElements["ezp-input"] & JSXBase.HTMLAttributes<HTMLEzpInputElement>;
@@ -13,12 +13,26 @@ export declare const storage: {
13
13
  getIsAuthorized(): boolean;
14
14
  setIsAuthorized(value: boolean): void;
15
15
  hasIsAuthorized(): boolean;
16
- getProperties(): PrinterProperties | null;
17
- setProperties(properties: PrinterProperties): void;
16
+ /**
17
+ * Settings the user last printed with on `printerId`, or null if that printer
18
+ * has none yet. Kept per printer so switching printers never carries another
19
+ * printer's paper size or tray over to one that may not have it.
20
+ */
21
+ getPrinterSettings(printerId: string): PrinterProperties | null;
22
+ setPrinterSettings(printerId: string, properties: PrinterProperties): void;
23
+ /** The printer used for the last print, preselected when the dialog reopens. */
18
24
  getPrinter(): Printer | null;
19
25
  setPrinter(printer: Printer): void;
20
- /** Remove everything tied to the current session (used on logout). */
26
+ /**
27
+ * Remove everything tied to the current session (used on logout).
28
+ *
29
+ * Print settings and the last printer deliberately survive: they belong to
30
+ * this browser profile rather than to the session, and are validated against
31
+ * the signed-in user's printers on the next load (an unknown printer resets
32
+ * the selection), so the next user never inherits a selection they can't use.
33
+ */
21
34
  clearSession(): void;
22
- /** Remove just the saved printer + its properties (used when the saved printer is gone). */
35
+ /** Forget which printer was last used (when it is gone from the user's list).
36
+ * Its settings stay put, ready in case that printer comes back. */
23
37
  clearSavedPrinter(): void;
24
38
  };
@@ -52,6 +52,8 @@ export type TextButtonLevelTypes = 'primary' | 'secondary' | 'tertiary'
52
52
  export type TextButtonTypeTypes = 'button'
53
53
  export type LabelLevelTypes = 'primary' | 'secondary' | 'tertiary'
54
54
  export type WeightTypes = 'soft' | 'strong' | 'heavy'
55
+ export type TooltipPlacementTypes = 'top' | 'bottom'
56
+ export type TooltipAnchorTypes = 'container' | 'parent'
55
57
  export type ThemeTypes = 'pink' | 'red' | 'orange' | 'green' | 'teal' | 'cyan' | 'blue' | 'violet'
56
58
  export type AppearanceTypes = 'system' | 'light' | 'dark'
57
59
  export type TriggerTypes = 'custom' | 'file' | 'button'
@@ -8,6 +8,24 @@ import { PrinterConfig, PrinterProperties } from '../shared/types';
8
8
  * and returns it for convenience.
9
9
  */
10
10
  export declare function applyPrinterDefaults(config: PrinterConfig, properties: PrinterProperties): PrinterProperties;
11
+ /**
12
+ * Carry the settings the user last printed with on this printer over the
13
+ * printer's own defaults, dropping anything the printer can no longer do.
14
+ *
15
+ * Capabilities change between sessions — a printer loses a tray, an admin
16
+ * swaps the paper formats — and a stale value would otherwise be sent to the
17
+ * API or shown as a selection that isn't in the list. Each field is therefore
18
+ * only restored if the current config still offers it; everything else stays
19
+ * on the default `applyPrinterDefaults` just put in place. Copies and page
20
+ * ranges are never part of `saved`, so they are never restored.
21
+ */
22
+ export declare function applySavedProperties(config: PrinterConfig, saved: PrinterProperties | null, properties: PrinterProperties): PrinterProperties;
23
+ /**
24
+ * The slice of the current selection worth remembering for next time: what the
25
+ * print dialog offers per printer, minus copies and page ranges, which belong
26
+ * to the one document being printed rather than to the printer.
27
+ */
28
+ export declare function pickRememberedProperties(properties: PrinterProperties): PrinterProperties;
11
29
  /** Does this printer config report an explicit "no usable trays" state? */
12
30
  export declare function hasNoTrays(config: PrinterConfig): boolean;
13
31
  /** Does this printer config expose at least one selectable tray? */
@@ -1,4 +1,4 @@
1
- import { PrinterProperties } from './../shared/types';
1
+ import { PrinterProperties, TooltipPlacementTypes } from './../shared/types';
2
2
  export { PAPER_ID } from '../shared/constants';
3
3
  /**
4
4
  * Re-render a Stencil component whenever the i18next language changes.
@@ -9,6 +9,25 @@ export { PAPER_ID } from '../shared/constants';
9
9
  * disconnectedCallback.
10
10
  */
11
11
  export declare function subscribeToLanguageChange(component: unknown): () => void;
12
+ /** Index of the first child of a scroll container that is at least half in
13
+ * view, or -1 when it has none. Lists use it to open the topmost visible row's
14
+ * tooltip downwards, as nothing in the list is left above that row to cover.
15
+ * A row showing only a sliver doesn't count: the row below it is the one the
16
+ * user reads first, and that one should open downwards. */
17
+ export declare function firstVisibleChild(container: HTMLElement): number;
18
+ /**
19
+ * Side a tooltip should open on, given where it was asked to open and the room
20
+ * there is. The requested side wins whenever the bubble fits there; otherwise
21
+ * it flips to the other side if that fits, or if that simply has more room.
22
+ * All values are in the same (screen) pixels.
23
+ */
24
+ export declare function pickTooltipSide(requested: TooltipPlacementTypes, row: {
25
+ top: number;
26
+ bottom: number;
27
+ }, needed: number, visible: {
28
+ top: number;
29
+ bottom: number;
30
+ }): TooltipPlacementTypes;
12
31
  export declare function encodeFormData(data: {
13
32
  [x: string]: string | number | boolean;
14
33
  }): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezeep/ezeep-js",
3
- "version": "1.0.294",
3
+ "version": "1.0.306",
4
4
  "description": "A JavaScript library to enable easy and fast printing on any web application uising ezeep Blue.",
5
5
  "author": "Thinprint GmbH",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- import{p as e,B as t,c as n,w as i,N as l,H as a,b as r}from"./p-BButrLnB.js";export{s as setNonce}from"./p-BButrLnB.js";import{g as o}from"./p-C0WTlb31.js";var p=e=>{const t=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return t.call(this,e);const n=t.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&n.appendChild(i[e].cloneNode(!0));return n}};(()=>{t.isDev&&!t.isTesting&&n("Running in development mode."),t.cloneNodeFix&&p(a.prototype);const s=t.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${l}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===l)):null,r=import.meta.url,o=t.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)})().then((async e=>(await o(),r([["p-3ab5a223",[[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}],[1,"ezp-printer-selection",{clientID:[1,"client-i-d"],redirectURI:[1,"redirect-u-r-i"],filename:[1025],fileurl:[1],filetype:[1025],fileid:[1025],files:[16],hidemenu:[4],hideheader:[4],seamless:[4],loading:[32],printProcessing:[32],pageRangeInvalid:[32],uploading:[32],preparingUpload:[32],printSuccess:[32],printFailed:[32],printTimedOut:[32],notSupported:[32],noPrinters:[32],hubDriverError:[32],userMenuOpen:[32],printStopped:[32],userName:[32],printers:[32],selectedPrinter:[32],printerConfig:[32],selectedPrinterConfig:[32],selectedProperties:[32],paperid:[32],currentFileIndex:[32],totalFiles:[32],failedFiles:[32],successfulFiles:[32],partialSuccess:[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{selectedFiles:[32],dragging:[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{heading:[1],description:[1],action:[1],iconName:[1,"icon-name"],iconSize:[1,"icon-size"],iconFramed:[4,"icon-framed"],instance:[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{name:[1],open:[1028]},null,{open:[{watchOpen:0}]}],[1,"ezp-select",{icon:[1],label:[1],optionFlow:[1,"option-flow"],options:[16],placeholder:[1],preSelected:[8,"pre-selected"],toggleFlow:[1,"toggle-flow"],disabled:[4],expanded:[32],selected:[32]},null,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}],[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}],[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},null,{value:[{watchValue:0}]}],[1,"ezp-status",{description:[1],subtext:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}],[1,"ezp-backdrop",{visible:[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{blank:[4],disabled:[4],href:[1],icon:[1],level:[1],type:[1]}],[1,"ezp-text-button",{blank:[4],disabled:[4],href:[1],level:[1],label:[1],type:[1],small:[4]}],[1,"ezp-icon",{name:[1],size:[1],framed:[4]}],[1,"ezp-label",{ellipsis:[4],level:[1],noWrap:[4,"no-wrap"],text:[1],weight:[1]}]]]],e))));
1
+ import{p as e,B as t,c as n,w as i,N as l,H as a,b as r}from"./p-BButrLnB.js";export{s as setNonce}from"./p-BButrLnB.js";import{g as o}from"./p-C0WTlb31.js";var p=e=>{const t=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return t.call(this,e);const n=t.call(this,!1),i=this.childNodes;if(e)for(let e=0;e<i.length;e++)2!==i[e].nodeType&&n.appendChild(i[e].cloneNode(!0));return n}};(()=>{t.isDev&&!t.isTesting&&n("Running in development mode."),t.cloneNodeFix&&p(a.prototype);const s=t.scriptDataOpts?i.document&&Array.from(i.document.querySelectorAll("script")).find((e=>new RegExp(`/${l}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===l)):null,r=import.meta.url,o=t.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)})().then((async e=>(await o(),r([["p-646c1d42",[[257,"ezp-printing",{clientid:[1],redirecturi:[1],filename:[1025],fileurl:[1],filetype:[1],custom:[4],hidelogin:[4],hidemenu:[4],hideheader:[4],authapihosturl:[1],printapihosturl:[1],theme:[1],fileid:[1],appearance:[1],trigger:[1],language:[1],code:[1],filedata:[1],seamless:[4],printOpen:[32],authOpen:[32],onlyGetSasUri:[32],noDocumentOpen:[32],systemAppearance:[32],files:[32],open:[64],logOut:[64],getSasUri:[64],getAuthUri:[64],setAuthRefreshToken:[64],checkAuth:[64]},[[0,"printCancel","listenPrintCancel"],[0,"printDismiss","listenPrintDismiss"],[0,"printSubmit","listenPrintSubmit"],[0,"authCancel","listenAuthCancel"],[0,"userCancel","listenUserCancel"],[0,"authSuccess","listenAuthSuccess"],[0,"uploadFile","listenUploadFile"],[0,"uploadContinue","listenUploadContinue"],[0,"dialogClose","listenDialogClose"],[0,"dialogAction","listenDialogAction"],[0,"logout","listenLogout"]],{filedata:[{watchFileData:0}],filename:[{watchFilename:0}],fileurl:[{watchFileUrl:0}],language:[{watchLanguage:0}]}],[1,"ezp-printer-selection",{clientID:[1,"client-i-d"],redirectURI:[1,"redirect-u-r-i"],filename:[1025],fileurl:[1],filetype:[1025],fileid:[1025],files:[16],hidemenu:[4],hideheader:[4],seamless:[4],loading:[32],printProcessing:[32],pageRangeInvalid:[32],uploading:[32],preparingUpload:[32],printSuccess:[32],printFailed:[32],printTimedOut:[32],notSupported:[32],noPrinters:[32],hubDriverError:[32],userMenuOpen:[32],printStopped:[32],firstVisibleFile:[32],userName:[32],printers:[32],selectedPrinter:[32],printerConfig:[32],selectedPrinterConfig:[32],selectedProperties:[32],loadingPrinterConfig:[32],paperid:[32],currentFileIndex:[32],totalFiles:[32],failedFiles:[32],successfulFiles:[32],partialSuccess:[32]},[[0,"inputValueChanged","listenInputValueChanged"],[0,"selectSelection","listenSelectSelection"],[0,"stepperChanged","listenStepperChanged"],[0,"userMenuClosure","listenUserMenuClosure"],[0,"logoutEmitter","listenLogout"],[0,"statusCancel","listenStatusCancel"],[0,"statusClose","listenStatusClose"],[0,"statusRetry","listenStatusRetry"]]],[1,"ezp-auth",{clientID:[1025,"client-i-d"],redirectURI:[1025,"redirect-u-r-i"],hidelogin:[4],trigger:[1],code:[1],auth:[32],authURI:[32],accessToken:[32]},[[0,"dialogAction","listenDialogAction"],[0,"dialogClose","listenDialogClose"],[0,"statusCancel","listenStatusCancel"]]],[1,"ezp-upload",{selectedFiles:[32],dragging:[32],firstVisibleFile:[32]},[[0,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[9,"drop","resetDrag"],[9,"dragend","resetDrag"],[4,"printCancel","listenPrintCancel"]]],[1,"ezp-dialog",{heading:[1],description:[1],action:[1],iconName:[1,"icon-name"],iconSize:[1,"icon-size"],iconFramed:[4,"icon-framed"],instance:[1]},[[8,"keydown","handleKeydown"]]],[1,"ezp-user-menu",{name:[1],open:[1028]},null,{open:[{watchOpen:0}]}],[1,"ezp-select",{icon:[1],label:[1],optionFlow:[1,"option-flow"],options:[16],placeholder:[1],preSelected:[8,"pre-selected"],toggleFlow:[1,"toggle-flow"],disabled:[4],expanded:[32],selected:[32]},null,{expanded:[{watchExpanded:0}],preSelected:[{preSelectedChanged:0}]}],[1,"ezp-input",{label:[1],value:[1032],type:[1],icon:[1],suffix:[513],eventType:[1,"event-type"],placeholder:[1],focused:[32]}],[1,"ezp-stepper",{icon:[1],label:[1],max:[2],min:[2],canDecrease:[32],canIncrease:[32],focused:[32],value:[32]},null,{value:[{watchValue:0}]}],[1,"ezp-status",{description:[1],subtext:[1],processing:[4],instance:[1],icon:[1],cancel:[8],close:[8],retry:[8]}],[1,"ezp-file-name",{name:[1],level:[1],weight:[1],placement:[1],anchor:[1],expanded:[32],tooltipOpen:[32]},[[10,"keydown","handleKeyDown"]],{tooltipOpen:[{watchTooltipOpen:0}]}],[1,"ezp-backdrop",{visible:[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-icon-button",{blank:[4],disabled:[4],href:[1],icon:[1],level:[1],type:[1]}],[1,"ezp-text-button",{blank:[4],disabled:[4],href:[1],level:[1],label:[1],type:[1],small:[4]}],[1,"ezp-icon",{name:[1],size:[1],framed:[4]}],[1,"ezp-label",{ellipsis:[4],level:[1],noWrap:[4,"no-wrap"],text:[1],weight:[1],isTruncated:[64]}]]]],e))));