@gataca/qr 2.0.0

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 (99) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/gat-icon-refresh-751505ff.js +14 -0
  3. package/dist/cjs/gataca-autoqr.cjs.entry.js +88 -0
  4. package/dist/cjs/gataca-qr.cjs.entry.js +175 -0
  5. package/dist/cjs/gataca-qrdisplay_2.cjs.entry.js +219 -0
  6. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +114 -0
  7. package/dist/cjs/gatacaqr.cjs.js +19 -0
  8. package/dist/cjs/index-0b7a1532.js +1410 -0
  9. package/dist/cjs/index.cjs.js +16 -0
  10. package/dist/cjs/loader.cjs.js +21 -0
  11. package/dist/cjs/qr-code-styling-412bbc7a.js +28 -0
  12. package/dist/cjs/utils-383ee834.js +26 -0
  13. package/dist/collection/assets/icons/gat-icon-alert.svg +5 -0
  14. package/dist/collection/assets/icons/gat-icon-check.svg +5 -0
  15. package/dist/collection/assets/icons/gat-icon-refresh.svg +4 -0
  16. package/dist/collection/assets/images/logo_gataca.svg +26 -0
  17. package/dist/collection/collection-manifest.json +17 -0
  18. package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +116 -0
  19. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +306 -0
  20. package/dist/collection/components/gataca-qr/gataca-qr.css +249 -0
  21. package/dist/collection/components/gataca-qr/gataca-qr.js +557 -0
  22. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +154 -0
  23. package/dist/collection/components/gataca-qrws/gataca-qrws.css +249 -0
  24. package/dist/collection/components/gataca-qrws/gataca-qrws.js +566 -0
  25. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +116 -0
  26. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +395 -0
  27. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +116 -0
  28. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +410 -0
  29. package/dist/collection/index.js +2 -0
  30. package/dist/collection/utils/index.js +1 -0
  31. package/dist/collection/utils/utils.js +21 -0
  32. package/dist/components/gat-icon-refresh.js +29 -0
  33. package/dist/components/gataca-autoqr.d.ts +11 -0
  34. package/dist/components/gataca-autoqr.js +144 -0
  35. package/dist/components/gataca-qr.d.ts +11 -0
  36. package/dist/components/gataca-qr.js +6 -0
  37. package/dist/components/gataca-qr2.js +211 -0
  38. package/dist/components/gataca-qrdisplay.d.ts +11 -0
  39. package/dist/components/gataca-qrdisplay.js +6 -0
  40. package/dist/components/gataca-qrdisplay2.js +93 -0
  41. package/dist/components/gataca-qrws.d.ts +11 -0
  42. package/dist/components/gataca-qrws.js +6 -0
  43. package/dist/components/gataca-qrws2.js +212 -0
  44. package/dist/components/gataca-ssibutton.d.ts +11 -0
  45. package/dist/components/gataca-ssibutton.js +6 -0
  46. package/dist/components/gataca-ssibutton2.js +100 -0
  47. package/dist/components/gataca-ssibuttonws.d.ts +11 -0
  48. package/dist/components/gataca-ssibuttonws.js +6 -0
  49. package/dist/components/gataca-ssibuttonws2.js +102 -0
  50. package/dist/components/index.d.ts +27 -0
  51. package/dist/components/index.js +8 -0
  52. package/dist/esm/gat-icon-refresh-179ea123.js +9 -0
  53. package/dist/esm/gataca-autoqr.entry.js +84 -0
  54. package/dist/esm/gataca-qr.entry.js +171 -0
  55. package/dist/esm/gataca-qrdisplay_2.entry.js +214 -0
  56. package/dist/esm/gataca-ssibutton_2.entry.js +109 -0
  57. package/dist/esm/gatacaqr.js +17 -0
  58. package/dist/esm/index-19eef502.js +1384 -0
  59. package/dist/esm/index.js +1 -0
  60. package/dist/esm/loader.js +17 -0
  61. package/dist/esm/polyfills/core-js.js +11 -0
  62. package/dist/esm/polyfills/css-shim.js +1 -0
  63. package/dist/esm/polyfills/dom.js +79 -0
  64. package/dist/esm/polyfills/es5-html-element.js +1 -0
  65. package/dist/esm/polyfills/index.js +34 -0
  66. package/dist/esm/polyfills/system.js +6 -0
  67. package/dist/esm/qr-code-styling-0eeb38d5.js +26 -0
  68. package/dist/esm/utils-05ba6c9f.js +23 -0
  69. package/dist/gatacaqr/gatacaqr.esm.js +1 -0
  70. package/dist/gatacaqr/index.esm.js +1 -0
  71. package/dist/gatacaqr/p-0905677f.entry.js +1 -0
  72. package/dist/gatacaqr/p-0be4566d.js +1 -0
  73. package/dist/gatacaqr/p-1d35273f.entry.js +1 -0
  74. package/dist/gatacaqr/p-2f22c7fc.js +1 -0
  75. package/dist/gatacaqr/p-4139a068.entry.js +1 -0
  76. package/dist/gatacaqr/p-a6f85341.js +2 -0
  77. package/dist/gatacaqr/p-b8ba109f.js +1 -0
  78. package/dist/gatacaqr/p-f85d7e76.entry.js +1 -0
  79. package/dist/index.cjs.js +1 -0
  80. package/dist/index.js +1 -0
  81. package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +85 -0
  82. package/dist/types/components/gataca-qr/gataca-qr.d.ts +131 -0
  83. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +35 -0
  84. package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +124 -0
  85. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +114 -0
  86. package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +110 -0
  87. package/dist/types/components.d.ts +830 -0
  88. package/dist/types/index.d.ts +2 -0
  89. package/dist/types/stencil-public-runtime.d.ts +1581 -0
  90. package/dist/types/utils/index.d.ts +1 -0
  91. package/dist/types/utils/utils.d.ts +56 -0
  92. package/loader/cdn.js +3 -0
  93. package/loader/index.cjs.js +3 -0
  94. package/loader/index.d.ts +12 -0
  95. package/loader/index.es2017.js +3 -0
  96. package/loader/index.js +4 -0
  97. package/loader/package.json +11 -0
  98. package/package.json +40 -0
  99. package/readme.md +67 -0
@@ -0,0 +1 @@
1
+ export * from "./utils";
@@ -0,0 +1,56 @@
1
+ export declare function checkMobile(): boolean;
2
+ export declare function base64UrlEncode(str: string): string;
3
+ export declare enum RESULT_STATUS {
4
+ NOT_STARTED = -1,
5
+ ONGOING = 0,
6
+ SUCCESS = 1,
7
+ FAILED = 2,
8
+ EXPIRED = 3
9
+ }
10
+ export declare type WSResponse = {
11
+ sessionId: string;
12
+ result: RESULT_STATUS;
13
+ authenticatedUserData?: any;
14
+ authenticationRequest?: string;
15
+ error?: string;
16
+ };
17
+ export declare type QRDisplay = {
18
+ qrModalTitle?: string;
19
+ qrModalDescription?: string;
20
+ hideBrandTitle?: boolean;
21
+ };
22
+ export declare type QRExchange = QRDisplay & {
23
+ successCallback: (data?: any) => void;
24
+ errorCallback: (error?: Error) => void;
25
+ autostart: boolean;
26
+ autorefresh: boolean;
27
+ sessionTimeout?: number;
28
+ qrRole: string;
29
+ callbackServer: string;
30
+ v2?: boolean;
31
+ dynamicLink?: boolean;
32
+ };
33
+ export declare type QRPolling = QRExchange & {
34
+ checkStatus?: (id?: string) => Promise<{
35
+ result: RESULT_STATUS;
36
+ data?: any;
37
+ }>;
38
+ createSession?: () => Promise<{
39
+ sessionId: string;
40
+ authenticationRequest?: string;
41
+ }>;
42
+ pollingFrequency?: number;
43
+ };
44
+ export declare type QRWS = QRExchange & {
45
+ socketEndpoint: string;
46
+ wsOnOpen?: (socket: WebSocket) => void;
47
+ wsOnMessage?: (socket: WebSocket, msg: MessageEvent) => void;
48
+ };
49
+ export declare type QRLogin = QRPolling & QRWS;
50
+ export declare type QRButton = QRLogin & {
51
+ buttonText?: string;
52
+ };
53
+ export declare type QRConfig = (QRLogin & QRButton) & {
54
+ useButton?: boolean;
55
+ useWs?: boolean;
56
+ };
package/loader/cdn.js ADDED
@@ -0,0 +1,3 @@
1
+
2
+ module.exports = require('../dist/cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,3 @@
1
+
2
+ module.exports = require('../dist/cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,12 @@
1
+ export * from '../dist/types/components';
2
+ export interface CustomElementsDefineOptions {
3
+ exclude?: string[];
4
+ resourcesUrl?: string;
5
+ syncQueue?: boolean;
6
+ jmp?: (c: Function) => any;
7
+ raf?: (c: FrameRequestCallback) => number;
8
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
9
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
+ }
11
+ export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
12
+ export declare function applyPolyfills(): Promise<void>;
@@ -0,0 +1,3 @@
1
+
2
+ export * from '../dist/esm/polyfills/index.js';
3
+ export * from '../dist/esm/loader.js';
@@ -0,0 +1,4 @@
1
+
2
+ (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
+ export * from '../dist/esm/polyfills/index.js';
4
+ export * from '../dist/esm/loader.js';
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "gatacaqr-loader",
3
+ "private": true,
4
+ "typings": "./index.d.ts",
5
+ "module": "./index.js",
6
+ "main": "./index.cjs.js",
7
+ "jsnext:main": "./index.es2017.js",
8
+ "es2015": "./index.es2017.js",
9
+ "es2017": "./index.es2017.js",
10
+ "unpkg": "./cdn.js"
11
+ }
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@gataca/qr",
3
+ "version": "2.0.0",
4
+ "description": "Gataca component to display presentation requests in QR",
5
+ "author": "Gataca <it@gataca.io>",
6
+ "licenses": [
7
+ {
8
+ "license": "MIT"
9
+ }
10
+ ],
11
+ "main": "dist/index.cjs.js",
12
+ "module": "dist/index.js",
13
+ "es2015": "dist/esm/index.mjs",
14
+ "es2017": "dist/esm/index.mjs",
15
+ "types": "dist/types/index.d.ts",
16
+ "collection": "dist/collection/collection-manifest.json",
17
+ "collection:main": "dist/collection/index.js",
18
+ "unpkg": "dist/gatacaqr/gatacaqr.js",
19
+ "files": [
20
+ "dist/",
21
+ "loader/"
22
+ ],
23
+ "scripts": {
24
+ "build": "stencil build --docs",
25
+ "start": "stencil build --dev --watch --serve",
26
+ "test": "stencil test --spec --e2e",
27
+ "test.watch": "stencil test --spec --e2e --watchAll",
28
+ "generate": "stencil generate"
29
+ },
30
+ "devDependencies": {
31
+ "@stencil/core": "^2.9.0",
32
+ "@stencil/sass": "^1.4.0",
33
+ "rollup-plugin-node-polyfills": "^0.2.1"
34
+ },
35
+ "license": "MIT",
36
+ "dependencies": {
37
+ "@stencil/react-output-target": "^0.3.1",
38
+ "qr-code-styling": "^1.6.0-rc.1"
39
+ }
40
+ }
package/readme.md ADDED
@@ -0,0 +1,67 @@
1
+ # Gataca-QR Components
2
+
3
+ Since V2, this library is now a list of components provided by Gataca to help the integration of its backends components into your front services.
4
+
5
+ To use this components (except for the QR Display), you will need an instance of any of the Gataca Components (Connect and Certify). You can also use it with onPremise instances over Gataca Studio.
6
+
7
+ ## Component List
8
+
9
+ ### [Gataca QRDisplay](src/components/gataca-qrdisplay/readme.md)
10
+
11
+ Just to display QRs with the Gataca format in any required component
12
+
13
+ ### [Gataca QR](src/components/gataca-qr/readme.md)
14
+
15
+ Main component of the library. It has been reworked and simplified, while keeping all it's flexibility.
16
+
17
+ It displays a qr as an overflow panel to integrate into your site. It requires that you have a backend service integrated with Gataca Connect or Certify.
18
+ ![GatacaQR](GatacaQR.png)
19
+
20
+ See its documentation for integration.
21
+
22
+ ### [Gataca QRWS](src/components/gataca-qrwsreadme.md)
23
+
24
+ This is another version of the QR supporting WebSockets instead of a constant polling to your service.
25
+ It enables a more updated an elegant architecture, but the complexity gets transported to your backend service which will need to handle the polling or support an Event-oriented architecture.
26
+
27
+ ### [Gataca SSIButton](src/components/gataca-ssibutton/readme.md)
28
+
29
+ This flavour supports the easy login button to integrate into your site instead of a panel.
30
+ The integration and parameters are analogue to the GatacaQR.
31
+
32
+ ![GatacaSSIButton](SSIButton.png)
33
+
34
+ ### [Gataca SSIButtonWS](src/components/gataca-ssibuttonws/readme.md)
35
+
36
+ Same as the SSI Button, but with Websockets :)
37
+ The integration and parameters are analogue to the GatacaQR.
38
+
39
+ ### [Gataca AutoQR](src/components/gataca-autoqr/readme.md)
40
+
41
+ ````note
42
+ WIP
43
+ ````
44
+
45
+ This component allows to simplify the integration by downloading all the configuration from a remote server.
46
+ However, the integration steps and functions of the selected subcomponent need to be still implemented and provided to the component.
47
+
48
+ ## Updating from V1
49
+
50
+ V1 was too flexible and confusing to integrate. We have removed all unuseful parameters to keep a more simplified process.
51
+
52
+ ### Breaking changes
53
+
54
+ * _sessionEndpoint_ and _generationEndpoint_ have been suppressed.
55
+ * _createSession_ and _checkStatus_ functions are now mandatory. The returning parameters of those functions have now changed.
56
+ * _qrRole_ is also mandatory. There is no default value. The possible values have changed to "**connect**" and "**certify**"
57
+ * _asButton_ and _buttonText_ functionality has been suppressed. That is a different component.
58
+ * _getLoginToken()_ has been suppressed. Any data that wants to be received from the session (from headers, body or whatever) must be provided by the _checkStatus_ result function.
59
+ * _sessionTimeout_ can be removed by introducing a negative value. If removed, the QR will wait until the server provides an error by session expiration.
60
+
61
+ ### Improvements
62
+
63
+ * Logs have been cleaned
64
+ * Fix providing feedback on the process result and results either if it expires, fails or successes.
65
+ * Stopping the component working upon disappearance
66
+ * Autostart and autorefresh capabilities
67
+ * Documentation and integration with the new provided components