@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.
- package/dist/cjs/{app-globals-D7ISNeUi.js → app-globals-L_3XPZxT.js} +7 -1
- package/dist/cjs/ezeep.cjs.js +4 -4
- package/dist/cjs/ezp-auth_15.cjs.entry.js +7338 -3700
- package/dist/cjs/{index-dv_gozsq.js → index-DM5v_sge.js} +3 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ezp-auth/ezp-auth.css +0 -12
- package/dist/collection/components/ezp-auth/ezp-auth.js +78 -18
- package/dist/collection/components/ezp-backdrop/ezp-backdrop.js +5 -5
- package/dist/collection/components/ezp-dialog/ezp-dialog.js +85 -13
- package/dist/collection/components/ezp-icon/assets/glyph-cloud-upload.svg +4 -0
- package/dist/collection/components/ezp-icon/assets/glyph-file.svg +3 -0
- package/dist/collection/components/ezp-icon/ezp-icon.js +8 -3
- package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +5 -2
- package/dist/collection/components/ezp-input/ezp-input.css +19 -38
- package/dist/collection/components/ezp-input/ezp-input.js +16 -14
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +175 -48
- package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +215 -329
- package/dist/collection/components/ezp-printing/ezp-printing.css +23 -23
- package/dist/collection/components/ezp-printing/ezp-printing.js +119 -35
- package/dist/collection/components/ezp-select/ezp-select.css +56 -38
- package/dist/collection/components/ezp-select/ezp-select.js +93 -14
- package/dist/collection/components/ezp-status/ezp-status.css +94 -9
- package/dist/collection/components/ezp-status/ezp-status.js +42 -13
- package/dist/collection/components/ezp-stepper/ezp-stepper.css +37 -35
- package/dist/collection/components/ezp-stepper/ezp-stepper.js +14 -7
- package/dist/collection/components/ezp-text-button/ezp-text-button.css +3 -3
- package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
- package/dist/collection/components/ezp-upload/ezp-upload.css +243 -77
- package/dist/collection/components/ezp-upload/ezp-upload.js +80 -10
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.css +2 -1
- package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +15 -15
- package/dist/collection/services/auth.js +37 -36
- package/dist/collection/services/http.js +11 -0
- package/dist/collection/services/print-job.js +72 -0
- package/dist/collection/services/print.js +21 -69
- package/dist/collection/services/user.js +2 -9
- package/dist/collection/shared/constants.js +55 -0
- package/dist/collection/shared/global.js +7 -1
- package/dist/collection/shared/storage.js +71 -0
- package/dist/collection/types/shared/types.d.ts +42 -9
- package/dist/collection/utils/printer.js +68 -0
- package/dist/collection/utils/utils.js +24 -9
- package/dist/components/auth.js +1 -1
- package/dist/components/ezp-auth2.js +1 -1
- package/dist/components/ezp-backdrop2.js +1 -1
- package/dist/components/ezp-dialog2.js +1 -1
- package/dist/components/ezp-icon-button2.js +1 -1
- package/dist/components/ezp-icon2.js +1 -1
- package/dist/components/ezp-input2.js +1 -1
- package/dist/components/ezp-printer-selection2.js +1 -1
- package/dist/components/ezp-printing.js +1 -1
- package/dist/components/ezp-select2.js +1 -1
- package/dist/components/ezp-status2.js +1 -1
- package/dist/components/ezp-stepper2.js +1 -1
- package/dist/components/ezp-text-button2.js +1 -1
- package/dist/components/ezp-upload2.js +1 -1
- package/dist/components/ezp-user-menu.js +1 -1
- package/dist/components/ezp-user-menu2.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/utils.js +1 -0
- package/dist/directives/proxies.ts +74 -47
- package/dist/esm/{app-globals-CpP67t2l.js → app-globals-C0WTlb31.js} +7 -1
- package/dist/esm/ezeep.js +5 -5
- package/dist/esm/ezp-auth_15.entry.js +7338 -3700
- package/dist/esm/{index-BTfWEHH9.js → index-BButrLnB.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/esm-es5/{app-globals-CpP67t2l.js → app-globals-C0WTlb31.js} +1 -1
- package/dist/esm-es5/ezeep.js +1 -1
- package/dist/esm-es5/ezp-auth_15.entry.js +2 -2
- package/dist/esm-es5/{index-BTfWEHH9.js → index-BButrLnB.js} +3 -3
- package/dist/esm-es5/loader.js +1 -1
- package/dist/ezeep/assets/glyph-cloud-upload.svg +4 -0
- package/dist/ezeep/assets/glyph-file.svg +3 -0
- package/dist/ezeep/ezeep.esm.js +1 -1
- package/dist/ezeep/ezeep.js +1 -1
- package/dist/ezeep/p-1e286bd1.system.entry.js +7 -0
- package/dist/ezeep/{p-BTfWEHH9.js → p-BButrLnB.js} +2 -2
- package/dist/ezeep/{p-CpP67t2l.js → p-C0WTlb31.js} +1 -1
- package/{www/build/p-DhXN1yGM.system.js → dist/ezeep/p-CYpousxy.system.js} +2 -2
- package/dist/ezeep/{p-5ok9OZMg.system.js → p-D4aCr1OK.system.js} +1 -1
- package/dist/ezeep/p-DCznw2Ee.system.js +1 -0
- package/dist/ezeep/p-a2b688f0.entry.js +1 -0
- package/dist/ezeep/types/shared/types.d.ts +42 -9
- package/dist/types/components/ezp-auth/ezp-auth.d.ts +8 -5
- package/dist/types/components/ezp-backdrop/ezp-backdrop.d.ts +2 -2
- package/dist/types/components/ezp-dialog/ezp-dialog.d.ts +14 -3
- package/dist/types/components/ezp-input/ezp-input.d.ts +17 -14
- package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +23 -7
- package/dist/types/components/ezp-printing/ezp-printing.d.ts +26 -2
- package/dist/types/components/ezp-select/ezp-select.d.ts +10 -4
- package/dist/types/components/ezp-status/ezp-status.d.ts +7 -4
- package/dist/types/components/ezp-stepper/ezp-stepper.d.ts +1 -1
- package/dist/types/components/ezp-upload/ezp-upload.d.ts +13 -1
- package/dist/types/components/ezp-user-menu/ezp-user-menu.d.ts +5 -2
- package/dist/types/components.d.ts +47 -39
- package/dist/types/services/auth.d.ts +10 -0
- package/dist/types/services/http.d.ts +4 -0
- package/dist/types/services/print-job.d.ts +48 -0
- package/dist/types/services/print.d.ts +10 -9
- package/dist/types/services/user.d.ts +13 -2
- package/dist/types/shared/constants.d.ts +51 -0
- package/dist/types/shared/storage.d.ts +24 -0
- package/dist/types/shared/types.d.ts +42 -9
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/types/utils/printer.d.ts +22 -0
- package/dist/types/utils/utils.d.ts +22 -10
- package/package.json +30 -18
- package/readme.md +1 -0
- package/www/build/assets/glyph-cloud-upload.svg +4 -0
- package/www/build/assets/glyph-file.svg +3 -0
- package/www/build/ezeep.esm.js +1 -1
- package/www/build/ezeep.js +1 -1
- package/www/build/p-1e286bd1.system.entry.js +7 -0
- package/www/build/p-544b7033.js +1 -0
- package/www/build/{p-BTfWEHH9.js → p-BButrLnB.js} +2 -2
- package/www/build/{p-CpP67t2l.js → p-C0WTlb31.js} +1 -1
- package/{dist/ezeep/p-DhXN1yGM.system.js → www/build/p-CYpousxy.system.js} +2 -2
- package/www/build/{p-5ok9OZMg.system.js → p-D4aCr1OK.system.js} +1 -1
- package/www/build/p-DCznw2Ee.system.js +1 -0
- package/www/build/p-a2b688f0.entry.js +1 -0
- package/www/data/locales/de.json +14 -5
- package/www/data/locales/en.json +14 -5
- package/www/index.html +2 -5
- package/dist/components/i18next.js +0 -1
- package/dist/ezeep/p-2177b8f4.system.entry.js +0 -7
- package/dist/ezeep/p-CfQRcOh8.system.js +0 -1
- package/dist/ezeep/p-de8f6583.entry.js +0 -1
- package/www/build/p-2177b8f4.system.entry.js +0 -7
- package/www/build/p-256870db.js +0 -1
- package/www/build/p-CfQRcOh8.system.js +0 -1
- package/www/build/p-de8f6583.entry.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const NAMESPACE = 'ezeep';
|
|
4
|
-
const BUILD = /* ezeep */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, deserializer: false, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow:
|
|
4
|
+
const BUILD = /* ezeep */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, deserializer: false, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propChangeCallback: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, serializer: false, shadowDelegatesFocus: false, shadowDom: true, shadowSlotAssignmentManual: false, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true };
|
|
5
5
|
const Env = /* ezeep */ {};
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.43.
|
|
8
|
+
Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
var Build = {
|
|
@@ -4685,6 +4685,7 @@ exports.StencilCore = StencilCore;
|
|
|
4685
4685
|
exports.bootstrapLazy = bootstrapLazy;
|
|
4686
4686
|
exports.consoleDevInfo = consoleDevInfo;
|
|
4687
4687
|
exports.createEvent = createEvent;
|
|
4688
|
+
exports.forceUpdate = forceUpdate;
|
|
4688
4689
|
exports.getAssetPath = getAssetPath;
|
|
4689
4690
|
exports.getElement = getElement;
|
|
4690
4691
|
exports.h = h;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var appGlobals = require('./app-globals-
|
|
3
|
+
var index = require('./index-DM5v_sge.js');
|
|
4
|
+
var appGlobals = require('./app-globals-L_3XPZxT.js');
|
|
5
5
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["ezp-auth_15.cjs",[[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,"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],"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]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[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]}],[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],"processing":[4],"instance":[1],"icon":[1],"cancel":[8],"close":[8],"retry":[8]}],[1,"ezp-backdrop",{"visible":[1028]},[[0,"animationend","listenAnimationEnd"]]],[1,"ezp-
|
|
9
|
+
return index.bootstrapLazy([["ezp-auth_15.cjs",[[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]},[[1,"dragenter","handleDragEnter"],[0,"dragover","handleDragOver"],[1,"dragleave","handleDragLeave"],[0,"drop","handleDrop"],[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]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -7,16 +7,4 @@
|
|
|
7
7
|
--ezp-theme-solid: var(--ezp-accent-cyan-solid);
|
|
8
8
|
--ezp-theme-translucent: var(--ezp-accent-cyan-translucent);
|
|
9
9
|
display: block;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.auth-actions {
|
|
13
|
-
display: flex;
|
|
14
|
-
gap: var(--ezp-spacing-3);
|
|
15
|
-
justify-content: space-between;
|
|
16
|
-
align-items: center;
|
|
17
|
-
width: 100%;
|
|
18
|
-
}
|
|
19
|
-
.auth-actions ezp-text-button {
|
|
20
|
-
flex: 1;
|
|
21
|
-
max-width: calc(50% - var(--ezp-spacing-3) / 2);
|
|
22
10
|
}
|
|
@@ -1,11 +1,48 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import { EzpAuthorizationService } from "../../services/auth";
|
|
3
3
|
import authStore from "../../services/auth";
|
|
4
|
+
import { subscribeToLanguageChange } from "../../utils/utils";
|
|
4
5
|
import i18next from "i18next";
|
|
5
6
|
export class EzpAuth {
|
|
6
7
|
constructor() {
|
|
7
8
|
this.oauthPopupWindow = null;
|
|
8
9
|
this.previousUrl = null;
|
|
10
|
+
// Bound once (arrow property) so add/removeEventListener share the same
|
|
11
|
+
// reference. An inline `(e) => this.receiveMessage(e)` never matches on
|
|
12
|
+
// remove, so listeners stacked across retried sign-ins and the popup's single
|
|
13
|
+
// code got exchanged once per accumulated listener.
|
|
14
|
+
this.receiveMessage = (event) => {
|
|
15
|
+
// Defense in depth #1: the code must come from the popup we opened — not any
|
|
16
|
+
// other window, frame or tab, even one served from the redirect origin.
|
|
17
|
+
if (this.oauthPopupWindow && event.source && event.source !== this.oauthPopupWindow) {
|
|
18
|
+
// eslint-disable-next-line no-console
|
|
19
|
+
console.warn('[ezeep] Ignored auth message from an unexpected source window.');
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
// Defense in depth #2: only accept the code from the expected redirect
|
|
23
|
+
// origin — otherwise any page could postMessage a forged code into the
|
|
24
|
+
// token exchange. Fail *open* if redirectURI can't be parsed so a config
|
|
25
|
+
// quirk can never silently block sign-in; the source-window check above
|
|
26
|
+
// still guards against forgery in that case. Warn on any rejection so a
|
|
27
|
+
// real mismatch is debuggable.
|
|
28
|
+
let expectedOrigin = null;
|
|
29
|
+
try {
|
|
30
|
+
expectedOrigin = new URL(this.redirectURI).origin;
|
|
31
|
+
}
|
|
32
|
+
catch (_a) {
|
|
33
|
+
expectedOrigin = null;
|
|
34
|
+
}
|
|
35
|
+
if (expectedOrigin && event.origin !== expectedOrigin) {
|
|
36
|
+
// eslint-disable-next-line no-console
|
|
37
|
+
console.warn(`[ezeep] Ignored auth message from unexpected origin "${event.origin}" (expected "${expectedOrigin}").`);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
authStore.state.code = event.data;
|
|
41
|
+
this.auth.getAccessToken().then(() => {
|
|
42
|
+
this.authCancel.emit();
|
|
43
|
+
this.authSuccess.emit();
|
|
44
|
+
});
|
|
45
|
+
};
|
|
9
46
|
}
|
|
10
47
|
listenDialogAction() {
|
|
11
48
|
this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login');
|
|
@@ -14,9 +51,27 @@ export class EzpAuth {
|
|
|
14
51
|
this.authCancel.emit();
|
|
15
52
|
}
|
|
16
53
|
listenStatusCancel() {
|
|
17
|
-
|
|
54
|
+
// Cancelling sign-in from the file trigger aborts the whole flow and clears
|
|
55
|
+
// the selected files (parity with the pre-redesign Cancel button). The button
|
|
56
|
+
// trigger has no pending selection, so it just closes the auth dialog.
|
|
57
|
+
if (this.trigger === 'file') {
|
|
58
|
+
this.userCancel.emit();
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this.authCancel.emit();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
connectedCallback() {
|
|
65
|
+
this.unsubscribeLanguage = subscribeToLanguageChange(this);
|
|
66
|
+
}
|
|
67
|
+
disconnectedCallback() {
|
|
68
|
+
var _a;
|
|
69
|
+
(_a = this.unsubscribeLanguage) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
70
|
+
// Don't leave the message listener behind when the component is removed.
|
|
71
|
+
window.removeEventListener('message', this.receiveMessage);
|
|
18
72
|
}
|
|
19
73
|
openSignInWindow(url, name) {
|
|
74
|
+
var _a;
|
|
20
75
|
if (authStore.state.isAuthorized) {
|
|
21
76
|
this.authCancel.emit();
|
|
22
77
|
this.authSuccess.emit();
|
|
@@ -41,7 +96,7 @@ export class EzpAuth {
|
|
|
41
96
|
typeof this.oauthPopupWindow.closed == 'undefined') {
|
|
42
97
|
alert('popup blocked');
|
|
43
98
|
}
|
|
44
|
-
this.oauthPopupWindow.focus();
|
|
99
|
+
(_a = this.oauthPopupWindow) === null || _a === void 0 ? void 0 : _a.focus();
|
|
45
100
|
}
|
|
46
101
|
else {
|
|
47
102
|
/* else the window reference must exist and the window
|
|
@@ -50,17 +105,11 @@ export class EzpAuth {
|
|
|
50
105
|
the window or to reload the referenced resource. */
|
|
51
106
|
this.oauthPopupWindow.focus();
|
|
52
107
|
}
|
|
53
|
-
// add the listener for receiving a message from the popup
|
|
54
|
-
|
|
108
|
+
// add the listener for receiving a message from the popup (same bound
|
|
109
|
+
// reference used by removeEventListener above, so it never stacks)
|
|
110
|
+
window.addEventListener('message', this.receiveMessage, false);
|
|
55
111
|
this.previousUrl = this.auth.authURI;
|
|
56
112
|
}
|
|
57
|
-
receiveMessage(event) {
|
|
58
|
-
authStore.state.code = event.data;
|
|
59
|
-
this.auth.getAccessToken().then(() => {
|
|
60
|
-
this.authCancel.emit();
|
|
61
|
-
this.authSuccess.emit();
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
113
|
async componentWillLoad() {
|
|
65
114
|
this.auth = new EzpAuthorizationService(this.redirectURI, this.clientID);
|
|
66
115
|
if (this.code) {
|
|
@@ -74,12 +123,23 @@ export class EzpAuth {
|
|
|
74
123
|
await this.auth.generateCodeChallenge(authStore.state.codeVerifier);
|
|
75
124
|
this.auth.buildAuthURI();
|
|
76
125
|
}
|
|
77
|
-
if (this.hidelogin && this.trigger === 'button') {
|
|
78
|
-
|
|
126
|
+
if (this.hidelogin && (this.trigger === 'button' || this.trigger === 'file')) {
|
|
127
|
+
if (authStore.state.isAuthorized) {
|
|
128
|
+
// Already signed in: no sign-in popup is needed, so skip straight to the
|
|
129
|
+
// print options. Mirrors the authorized branch of openSignInWindow
|
|
130
|
+
// (authURI isn't built when already authorized, so we can't call it here).
|
|
131
|
+
this.authCancel.emit();
|
|
132
|
+
this.authSuccess.emit();
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
// Not signed in: trigger sign-in directly so the "Continue to print
|
|
136
|
+
// options" click leads to sign-in, without an extra confirmation button.
|
|
137
|
+
this.openSignInWindow(this.auth.authURI.toString(), 'ezeep Login');
|
|
138
|
+
}
|
|
79
139
|
}
|
|
80
140
|
}
|
|
81
141
|
render() {
|
|
82
|
-
return (h(Host, { key: '
|
|
142
|
+
return (h(Host, { key: 'c00096b96d6d21508d1a78d5ae5a7f552516d01f' }, this.hidelogin && (this.trigger === 'button' || this.trigger === 'file') ? (h("ezp-status", { description: i18next.t('login_dialog.action'), processing: true, cancel: true })) : (h("ezp-dialog", { heading: i18next.t('login_dialog.heading'), description: i18next.t('login_dialog.description'), action: i18next.t('login_dialog.action'), iconName: "logo", iconSize: "huge", iconFramed: false, instance: "login" }))));
|
|
83
143
|
}
|
|
84
144
|
static get is() { return "ezp-auth"; }
|
|
85
145
|
static get encapsulation() { return "shadow"; }
|
|
@@ -231,8 +291,8 @@ export class EzpAuth {
|
|
|
231
291
|
"text": ""
|
|
232
292
|
},
|
|
233
293
|
"complexType": {
|
|
234
|
-
"original": "
|
|
235
|
-
"resolved": "
|
|
294
|
+
"original": "void",
|
|
295
|
+
"resolved": "void",
|
|
236
296
|
"references": {}
|
|
237
297
|
}
|
|
238
298
|
}, {
|
|
@@ -246,8 +306,8 @@ export class EzpAuth {
|
|
|
246
306
|
"text": ""
|
|
247
307
|
},
|
|
248
308
|
"complexType": {
|
|
249
|
-
"original": "
|
|
250
|
-
"resolved": "
|
|
309
|
+
"original": "void",
|
|
310
|
+
"resolved": "void",
|
|
251
311
|
"references": {}
|
|
252
312
|
}
|
|
253
313
|
}];
|
|
@@ -13,7 +13,7 @@ export class EzpBackdrop {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return h(Host, { key: '
|
|
16
|
+
return h(Host, { key: '723bc1fc67fbe5a491e80094ec2444f4d6f9ce32', class: { hide: !this.visible }, onClick: () => this.handleClick() });
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "ezp-backdrop"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -63,8 +63,8 @@ export class EzpBackdrop {
|
|
|
63
63
|
"text": ""
|
|
64
64
|
},
|
|
65
65
|
"complexType": {
|
|
66
|
-
"original": "
|
|
67
|
-
"resolved": "
|
|
66
|
+
"original": "void",
|
|
67
|
+
"resolved": "void",
|
|
68
68
|
"references": {}
|
|
69
69
|
}
|
|
70
70
|
}, {
|
|
@@ -78,8 +78,8 @@ export class EzpBackdrop {
|
|
|
78
78
|
"text": ""
|
|
79
79
|
},
|
|
80
80
|
"complexType": {
|
|
81
|
-
"original": "
|
|
82
|
-
"resolved": "
|
|
81
|
+
"original": "void",
|
|
82
|
+
"resolved": "void",
|
|
83
83
|
"references": {}
|
|
84
84
|
}
|
|
85
85
|
}];
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
import i18next from "i18next";
|
|
3
|
+
import { subscribeToLanguageChange } from "../../utils/utils";
|
|
3
4
|
export class EzpDialog {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.action = i18next.t('button_actions.close');
|
|
6
7
|
this.iconSize = 'large';
|
|
7
8
|
this.iconFramed = true;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* Private methods
|
|
11
|
-
*
|
|
12
|
-
*/
|
|
13
9
|
this.handleClose = () => {
|
|
14
10
|
this.dialogClose.emit(this.instance);
|
|
15
11
|
};
|
|
@@ -17,19 +13,86 @@ export class EzpDialog {
|
|
|
17
13
|
this.dialogAction.emit(this.instance);
|
|
18
14
|
};
|
|
19
15
|
}
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
this.unsubscribeLanguage = subscribeToLanguageChange(this);
|
|
18
|
+
}
|
|
19
|
+
componentDidLoad() {
|
|
20
|
+
var _a;
|
|
21
|
+
// Move focus into the dialog so keyboard/screen-reader users land here.
|
|
22
|
+
(_a = this.box) === null || _a === void 0 ? void 0 : _a.focus();
|
|
23
|
+
}
|
|
24
|
+
disconnectedCallback() {
|
|
25
|
+
var _a;
|
|
26
|
+
(_a = this.unsubscribeLanguage) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
27
|
+
}
|
|
20
28
|
/**
|
|
21
29
|
*
|
|
22
|
-
*
|
|
30
|
+
* Private methods
|
|
23
31
|
*
|
|
24
32
|
*/
|
|
25
|
-
|
|
33
|
+
handleKeydown(event) {
|
|
34
|
+
if (event.key === 'Escape') {
|
|
35
|
+
this.handleClose();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (event.key === 'Tab') {
|
|
39
|
+
this.trapFocus(event);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** Keep Tab focus cycling inside the modal (across nested shadow roots). */
|
|
43
|
+
trapFocus(event) {
|
|
44
|
+
if (!this.box)
|
|
45
|
+
return;
|
|
46
|
+
const focusable = this.collectFocusable(this.box);
|
|
47
|
+
if (focusable.length === 0)
|
|
48
|
+
return;
|
|
49
|
+
const first = focusable[0];
|
|
50
|
+
const last = focusable[focusable.length - 1];
|
|
51
|
+
const active = this.deepActiveElement();
|
|
52
|
+
if (!active || !focusable.includes(active)) {
|
|
53
|
+
// Focus is on the dialog box or escaped it — pull it to the first control.
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
first.focus();
|
|
56
|
+
}
|
|
57
|
+
else if (event.shiftKey && active === first) {
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
last.focus();
|
|
60
|
+
}
|
|
61
|
+
else if (!event.shiftKey && active === last) {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
first.focus();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/** Tabbable elements in the flattened tree, descending into shadow roots. */
|
|
67
|
+
collectFocusable(root) {
|
|
68
|
+
const result = [];
|
|
69
|
+
const visit = (node) => {
|
|
70
|
+
node.querySelectorAll('*').forEach((el) => {
|
|
71
|
+
if (el.tabIndex >= 0 && !el.disabled)
|
|
72
|
+
result.push(el);
|
|
73
|
+
if (el.shadowRoot)
|
|
74
|
+
visit(el.shadowRoot);
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
visit(root);
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
/** The truly-focused element, following activeElement through shadow roots. */
|
|
81
|
+
deepActiveElement() {
|
|
82
|
+
var _a;
|
|
83
|
+
let el = document.activeElement;
|
|
84
|
+
while ((_a = el === null || el === void 0 ? void 0 : el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) {
|
|
85
|
+
el = el.shadowRoot.activeElement;
|
|
86
|
+
}
|
|
87
|
+
return el;
|
|
88
|
+
}
|
|
26
89
|
/**
|
|
27
90
|
*
|
|
28
91
|
* Render method
|
|
29
92
|
*
|
|
30
93
|
*/
|
|
31
94
|
render() {
|
|
32
|
-
return (h(Host, { key: '
|
|
95
|
+
return (h(Host, { key: '4f86872972538970ab0d3e6e15055ae558537f4d' }, h("div", { key: 'fd78a41cf3f37ecc2481e6fb11c9031dcb45a063', id: "box", role: "dialog", "aria-modal": "true", "aria-label": this.heading, tabindex: -1, ref: (el) => (this.box = el) }, h("div", { key: 'defd711c745edc2fd0be5349f67f6795659c4c80', id: "header" }, h("ezp-icon-button", { key: '7da94b33c02de9acca8e5a77bb74757d36e607fd', level: "tertiary", icon: "close", type: "button", onClick: this.handleClose })), h("div", { key: '092387310d14f01aea60d0e7750de470a5184fe4', id: "body" }, this.iconName && (h("ezp-icon", { key: 'a933e2cb2e686544d9fbb31e3b7ee1eee2766deb', name: this.iconName, size: this.iconSize, framed: this.iconFramed })), h("div", { key: '45cafccc90a14bc5993c0696eed9567e01ab62e7', id: "text" }, h("ezp-label", { key: 'ffbd56a50d2fb7f6d62309eadeeb0f1da7fc93b6', text: this.heading, weight: "heavy" }), h("ezp-label", { key: '7563c3d9085eee67361c4ff8220da5c9a5de9d5c', text: this.description }))), h("div", { key: '999423e06a1b5721cc8c3788471235759e50b14a', id: "footer" }, h("ezp-text-button", { key: '16c8a33207a06d3e1a436e08098bfd9b6587306e', type: "button", level: "primary", onClick: this.handleAction, label: this.action })))));
|
|
33
96
|
}
|
|
34
97
|
static get is() { return "ezp-dialog"; }
|
|
35
98
|
static get encapsulation() { return "shadow"; }
|
|
@@ -108,7 +171,7 @@ export class EzpDialog {
|
|
|
108
171
|
"mutable": false,
|
|
109
172
|
"complexType": {
|
|
110
173
|
"original": "IconNameTypes",
|
|
111
|
-
"resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
|
|
174
|
+
"resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"cloud-upload\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"file\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\" | undefined",
|
|
112
175
|
"references": {
|
|
113
176
|
"IconNameTypes": {
|
|
114
177
|
"location": "import",
|
|
@@ -209,8 +272,8 @@ export class EzpDialog {
|
|
|
209
272
|
"text": "\nEvents"
|
|
210
273
|
},
|
|
211
274
|
"complexType": {
|
|
212
|
-
"original": "
|
|
213
|
-
"resolved": "
|
|
275
|
+
"original": "string",
|
|
276
|
+
"resolved": "string",
|
|
214
277
|
"references": {}
|
|
215
278
|
}
|
|
216
279
|
}, {
|
|
@@ -224,10 +287,19 @@ export class EzpDialog {
|
|
|
224
287
|
"text": ""
|
|
225
288
|
},
|
|
226
289
|
"complexType": {
|
|
227
|
-
"original": "
|
|
228
|
-
"resolved": "
|
|
290
|
+
"original": "string",
|
|
291
|
+
"resolved": "string",
|
|
229
292
|
"references": {}
|
|
230
293
|
}
|
|
231
294
|
}];
|
|
232
295
|
}
|
|
296
|
+
static get listeners() {
|
|
297
|
+
return [{
|
|
298
|
+
"name": "keydown",
|
|
299
|
+
"method": "handleKeydown",
|
|
300
|
+
"target": "window",
|
|
301
|
+
"capture": false,
|
|
302
|
+
"passive": false
|
|
303
|
+
}];
|
|
304
|
+
}
|
|
233
305
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 3C9.38 3 7.14 4.68 6.34 7.03C4.44 7.34 3 8.99 3 11C3 13.21 4.79 15 7 15H8V13H7C5.9 13 5 12.1 5 11C5 9.9 5.9 9 7 9H8V8C8 5.79 9.79 4 12 4C13.86 4 15.43 5.28 15.87 7.0L16.09 7.86L16.98 7.99C18.13 8.16 19 9.16 19 10.35C19 11.68 17.93 13 16.35 13H16V15H16.35C18.9 15 21 13 21 10.35C21 8.31 19.63 6.57 17.74 6.09C16.98 4.2 15.14 3 12 3Z" />
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 10L8 14H11V21H13V14H16L12 10Z" />
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 2H14L20 8V22H6C4.9 22 4 21.1 4 20V4C4 2.9 4.9 2 6 2ZM6 4V20H18V9H13V4H6ZM15 4.41L17.59 7H15V4.41ZM8 12H16V14H8V12ZM8 16H14V18H8V16Z" />
|
|
3
|
+
</svg>
|
|
@@ -17,7 +17,9 @@ export class EzpIcon {
|
|
|
17
17
|
.then((result) => {
|
|
18
18
|
this.glyph = result;
|
|
19
19
|
})
|
|
20
|
-
.catch((
|
|
20
|
+
.catch(() => {
|
|
21
|
+
// Missing/unfetchable glyph — render nothing rather than crash.
|
|
22
|
+
});
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
*
|
|
@@ -25,7 +27,10 @@ export class EzpIcon {
|
|
|
25
27
|
*
|
|
26
28
|
*/
|
|
27
29
|
render() {
|
|
28
|
-
return (
|
|
30
|
+
return (
|
|
31
|
+
// Decorative: icons here always sit next to a label or live-region text,
|
|
32
|
+
// so hide them from the accessibility tree to avoid double announcements.
|
|
33
|
+
h(Host, { key: 'e1b22ece00f1260a34561c8d1efd44c2d5f37c73', class: `${this.size} ${this.framed ? 'framed' : ''}`, "aria-hidden": "true" }, h("div", { key: '0734d4b5fdc363303d69b7e5dc138f8caeaa316c', id: "glyph", innerHTML: this.glyph })));
|
|
29
34
|
}
|
|
30
35
|
static get is() { return "ezp-icon"; }
|
|
31
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -47,7 +52,7 @@ export class EzpIcon {
|
|
|
47
52
|
"mutable": false,
|
|
48
53
|
"complexType": {
|
|
49
54
|
"original": "IconNameTypes",
|
|
50
|
-
"resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
|
|
55
|
+
"resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"cloud-upload\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"file\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
|
|
51
56
|
"references": {
|
|
52
57
|
"IconNameTypes": {
|
|
53
58
|
"location": "import",
|
|
@@ -29,7 +29,10 @@ export class EzpIconButton {
|
|
|
29
29
|
href: this.href,
|
|
30
30
|
target: this.blank ? '_blank' : '_self',
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
// Icon-only control: derive an accessible name from the icon so screen
|
|
33
|
+
// readers announce something meaningful (e.g. "menu", "printer").
|
|
34
|
+
const label = this.icon.replace(/[-_]/g, ' ');
|
|
35
|
+
return (h(Host, { key: '7d3d43ec31503ff7ecc87e9f498ee5b2d09d5d96', class: `${this.level}` }, h(TagType, Object.assign({ key: 'b7d5c646bb66ebff92d661574c647f8a2773a908', id: "button", "aria-label": label }, attributes), h("ezp-icon", { key: 'bc4c322b7c9389a8aaa27feac7084ae9e1befaa4', name: this.icon }))));
|
|
33
36
|
}
|
|
34
37
|
static get is() { return "ezp-icon-button"; }
|
|
35
38
|
static get encapsulation() { return "shadow"; }
|
|
@@ -109,7 +112,7 @@ export class EzpIconButton {
|
|
|
109
112
|
"mutable": false,
|
|
110
113
|
"complexType": {
|
|
111
114
|
"original": "IconNameTypes",
|
|
112
|
-
"resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
|
|
115
|
+
"resolved": "\"account\" | \"checkmark\" | \"checkmark-alt\" | \"close\" | \"cloud-upload\" | \"color\" | \"copies\" | \"dark\" | \"drag-drop\" | \"duplex\" | \"exclamation-mark\" | \"expand\" | \"file\" | \"height\" | \"help\" | \"light\" | \"logo\" | \"logout\" | \"menu\" | \"minus\" | \"orientation\" | \"paper_range\" | \"plus\" | \"printer\" | \"quality\" | \"question-mark\" | \"size\" | \"system\" | \"trays\" | \"width\"",
|
|
113
116
|
"references": {
|
|
114
117
|
"IconNameTypes": {
|
|
115
118
|
"location": "import",
|
|
@@ -29,18 +29,16 @@
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
:host {
|
|
32
|
+
align-items: center;
|
|
33
|
+
background: transparent;
|
|
34
|
+
cursor: text;
|
|
32
35
|
display: grid;
|
|
36
|
+
gap: var(--ezp-spacing-3);
|
|
33
37
|
grid-template: var(--ezp-input-grid-template, auto/auto auto 1fr);
|
|
34
|
-
height:
|
|
38
|
+
height: 56px;
|
|
39
|
+
padding: var(--ezp-spacing-2) var(--ezp-spacing-3);
|
|
35
40
|
position: relative;
|
|
36
|
-
gap: var(--ezp-spacing-3);
|
|
37
|
-
background: var(--ezp-input-background, var(--ezp-core-surface-tertiary));
|
|
38
|
-
padding: 0 var(--ezp-spacing-3);
|
|
39
41
|
z-index: var(--ezp-input-z-index, 3);
|
|
40
|
-
border-radius: var(--ezp-input-border-radius, 0);
|
|
41
|
-
box-shadow: var(--ezp-input-box-shadow-position-top, 0 -1px 0 0) var(--ezp-core-outline), var(--ezp-input-box-shadow-position-right, 1px 0 0 0) var(--ezp-core-outline), var(--ezp-input-box-shadow-position-bottom, 0 1px 0 0) var(--ezp-core-outline), var(--ezp-input-box-shadow-position-left, -1px 0 0 0) var(--ezp-core-outline);
|
|
42
|
-
align-items: center;
|
|
43
|
-
cursor: pointer;
|
|
44
42
|
}
|
|
45
43
|
:host([suffix]) {
|
|
46
44
|
--ezp-input-grid-template: auto / auto auto 1fr auto;
|
|
@@ -48,41 +46,19 @@
|
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
:host(.focused) {
|
|
51
|
-
--ezp-input-
|
|
52
|
-
--ezp-input-label-color: var(--ezp-theme-solid);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:host(:first-child) {
|
|
56
|
-
--ezp-input-border-radius: 3px 3px 0 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
:host(:last-child) {
|
|
60
|
-
--ezp-input-border-radius: 0 0 3px 3px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:host(:first-child:last-child) {
|
|
64
|
-
--ezp-input-border-radius: 3px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
:host(:not(:last-child)) {
|
|
68
|
-
--ezp-input-box-shadow-position-bottom: 0 0 0 0;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:host(:hover) {
|
|
72
|
-
--ezp-input-background: linear-gradient(
|
|
73
|
-
0deg,
|
|
74
|
-
var(--ezp-core-shade-primary) 0%,
|
|
75
|
-
var(--ezp-core-shade-primary) 100%
|
|
76
|
-
),
|
|
77
|
-
var(--ezp-core-surface-tertiary);
|
|
49
|
+
--ezp-input-label-color: var(--ezp-core-foreground-primary);
|
|
78
50
|
}
|
|
79
51
|
|
|
80
52
|
#label {
|
|
81
|
-
color: var(--ezp-input-label-color, var(--ezp-core-foreground-
|
|
53
|
+
color: var(--ezp-input-label-color, var(--ezp-core-foreground-primary));
|
|
82
54
|
}
|
|
83
55
|
|
|
84
56
|
#icon {
|
|
85
|
-
|
|
57
|
+
--ezp-icon-background: var(--ezp-theme-translucent);
|
|
58
|
+
--ezp-icon-borderRadius: 50%;
|
|
59
|
+
--ezp-icon-height: 40px;
|
|
60
|
+
--ezp-icon-width: 40px;
|
|
61
|
+
color: var(--ezp-input-icon-color, var(--ezp-theme-solid));
|
|
86
62
|
}
|
|
87
63
|
|
|
88
64
|
#input {
|
|
@@ -93,10 +69,11 @@
|
|
|
93
69
|
box-shadow: none;
|
|
94
70
|
box-sizing: border-box;
|
|
95
71
|
color: var(--ezp-core-foreground-primary);
|
|
96
|
-
cursor:
|
|
72
|
+
cursor: text;
|
|
97
73
|
font-family: inherit;
|
|
98
74
|
font-feature-settings: "tnum";
|
|
99
75
|
font-size: 14px;
|
|
76
|
+
font-weight: 600;
|
|
100
77
|
-webkit-font-smoothing: antialiased;
|
|
101
78
|
height: 30px;
|
|
102
79
|
letter-spacing: -0.0062235443em;
|
|
@@ -106,6 +83,10 @@
|
|
|
106
83
|
text-align: right;
|
|
107
84
|
width: 100%;
|
|
108
85
|
}
|
|
86
|
+
#input::placeholder {
|
|
87
|
+
color: var(--ezp-core-foreground-tertiary);
|
|
88
|
+
font-weight: 400;
|
|
89
|
+
}
|
|
109
90
|
#input[type=number]::-webkit-inner-spin-button, #input[type=number]::-webkit-outer-spin-button {
|
|
110
91
|
-webkit-appearance: none;
|
|
111
92
|
}
|