@seamly/web-ui 19.1.0 → 19.1.1

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.
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * focus-trap 6.7.1
3
+ * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
4
+ */
5
+
6
+ /*!
7
+ * tabbable 5.2.1
8
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
9
+ */
@@ -0,0 +1,275 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ "use strict";
3
+ /******/ // The require scope
4
+ /******/ var __webpack_require__ = {};
5
+ /******/
6
+ /************************************************************************/
7
+ /******/ /* webpack/runtime/define property getters */
8
+ /******/ (() => {
9
+ /******/ // define getter functions for harmony exports
10
+ /******/ __webpack_require__.d = (exports, definition) => {
11
+ /******/ for(var key in definition) {
12
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
14
+ /******/ }
15
+ /******/ }
16
+ /******/ };
17
+ /******/ })();
18
+ /******/
19
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
20
+ /******/ (() => {
21
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
22
+ /******/ })();
23
+ /******/
24
+ /******/ /* webpack/runtime/make namespace object */
25
+ /******/ (() => {
26
+ /******/ // define __esModule on exports
27
+ /******/ __webpack_require__.r = (exports) => {
28
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
29
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
30
+ /******/ }
31
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
32
+ /******/ };
33
+ /******/ })();
34
+ /******/
35
+ /************************************************************************/
36
+ var __webpack_exports__ = {};
37
+ // ESM COMPAT FLAG
38
+ __webpack_require__.r(__webpack_exports__);
39
+
40
+ // EXPORTS
41
+ __webpack_require__.d(__webpack_exports__, {
42
+ "appStorageProvider": () => (/* reexport */ appStore),
43
+ "cookieStorageProvider": () => (/* reexport */ cookieStore),
44
+ "sessionStorageProvider": () => (/* reexport */ store)
45
+ });
46
+
47
+ ;// CONCATENATED MODULE: ./src/javascripts/lib/store/providers/app-storage.js
48
+ function appStore() {
49
+ return {
50
+ get: () => {
51
+ // For Android we can retrieve data directly over the bridge
52
+ // iOS and ReactNative will write the data on the window.seamlyBridgeData object on init
53
+ if (window.hasOwnProperty('SeamlyBridge')) {
54
+ try {
55
+ // eslint-disable-next-line no-undef
56
+ return JSON.parse(SeamlyBridge.getData());
57
+ } catch (e) {
58
+ console.error('Unexpected or malformed data retrieved from bridge', e); // Android should always return unchanged JSON data.
59
+ // If something went wrong parsing the response, it's best to start from scratch
60
+
61
+ return {};
62
+ }
63
+ }
64
+
65
+ return window.seamlyBridgeData;
66
+ },
67
+ set: newData => {
68
+ // iOS
69
+ if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.seamlyBridge) {
70
+ window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(newData));
71
+ } // Android
72
+
73
+
74
+ if (window.hasOwnProperty('SeamlyBridge')) {
75
+ // eslint-disable-next-line no-undef
76
+ SeamlyBridge.setData(JSON.stringify(newData));
77
+ } // React Native
78
+
79
+
80
+ if (window.ReactNativeWebView) {
81
+ window.ReactNativeWebView.postMessage(JSON.stringify(newData));
82
+ }
83
+ }
84
+ };
85
+ }
86
+ ;// CONCATENATED MODULE: ./node_modules/js-cookie/dist/js.cookie.mjs
87
+ /*! js-cookie v3.0.1 | MIT */
88
+ /* eslint-disable no-var */
89
+ function js_cookie_assign (target) {
90
+ for (var i = 1; i < arguments.length; i++) {
91
+ var source = arguments[i];
92
+ for (var key in source) {
93
+ target[key] = source[key];
94
+ }
95
+ }
96
+ return target
97
+ }
98
+ /* eslint-enable no-var */
99
+
100
+ /* eslint-disable no-var */
101
+ var defaultConverter = {
102
+ read: function (value) {
103
+ if (value[0] === '"') {
104
+ value = value.slice(1, -1);
105
+ }
106
+ return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
107
+ },
108
+ write: function (value) {
109
+ return encodeURIComponent(value).replace(
110
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
111
+ decodeURIComponent
112
+ )
113
+ }
114
+ };
115
+ /* eslint-enable no-var */
116
+
117
+ /* eslint-disable no-var */
118
+
119
+ function init (converter, defaultAttributes) {
120
+ function set (key, value, attributes) {
121
+ if (typeof document === 'undefined') {
122
+ return
123
+ }
124
+
125
+ attributes = js_cookie_assign({}, defaultAttributes, attributes);
126
+
127
+ if (typeof attributes.expires === 'number') {
128
+ attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
129
+ }
130
+ if (attributes.expires) {
131
+ attributes.expires = attributes.expires.toUTCString();
132
+ }
133
+
134
+ key = encodeURIComponent(key)
135
+ .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
136
+ .replace(/[()]/g, escape);
137
+
138
+ var stringifiedAttributes = '';
139
+ for (var attributeName in attributes) {
140
+ if (!attributes[attributeName]) {
141
+ continue
142
+ }
143
+
144
+ stringifiedAttributes += '; ' + attributeName;
145
+
146
+ if (attributes[attributeName] === true) {
147
+ continue
148
+ }
149
+
150
+ // Considers RFC 6265 section 5.2:
151
+ // ...
152
+ // 3. If the remaining unparsed-attributes contains a %x3B (";")
153
+ // character:
154
+ // Consume the characters of the unparsed-attributes up to,
155
+ // not including, the first %x3B (";") character.
156
+ // ...
157
+ stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
158
+ }
159
+
160
+ return (document.cookie =
161
+ key + '=' + converter.write(value, key) + stringifiedAttributes)
162
+ }
163
+
164
+ function get (key) {
165
+ if (typeof document === 'undefined' || (arguments.length && !key)) {
166
+ return
167
+ }
168
+
169
+ // To prevent the for loop in the first place assign an empty array
170
+ // in case there are no cookies at all.
171
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
172
+ var jar = {};
173
+ for (var i = 0; i < cookies.length; i++) {
174
+ var parts = cookies[i].split('=');
175
+ var value = parts.slice(1).join('=');
176
+
177
+ try {
178
+ var foundKey = decodeURIComponent(parts[0]);
179
+ jar[foundKey] = converter.read(value, foundKey);
180
+
181
+ if (key === foundKey) {
182
+ break
183
+ }
184
+ } catch (e) {}
185
+ }
186
+
187
+ return key ? jar[key] : jar
188
+ }
189
+
190
+ return Object.create(
191
+ {
192
+ set: set,
193
+ get: get,
194
+ remove: function (key, attributes) {
195
+ set(
196
+ key,
197
+ '',
198
+ js_cookie_assign({}, attributes, {
199
+ expires: -1
200
+ })
201
+ );
202
+ },
203
+ withAttributes: function (attributes) {
204
+ return init(this.converter, js_cookie_assign({}, this.attributes, attributes))
205
+ },
206
+ withConverter: function (converter) {
207
+ return init(js_cookie_assign({}, this.converter, converter), this.attributes)
208
+ }
209
+ },
210
+ {
211
+ attributes: { value: Object.freeze(defaultAttributes) },
212
+ converter: { value: Object.freeze(converter) }
213
+ }
214
+ )
215
+ }
216
+
217
+ var api = init(defaultConverter, { path: '/' });
218
+ /* eslint-enable no-var */
219
+
220
+ /* harmony default export */ const js_cookie = (api);
221
+
222
+ ;// CONCATENATED MODULE: ./src/javascripts/lib/store/providers/cookie-storage.js
223
+
224
+ function cookieStore(attributes = {}) {
225
+ return function (key) {
226
+ const KEY = 'cvco.' + key;
227
+ return {
228
+ get() {
229
+ const jsonStr = js_cookie.get(KEY);
230
+ return jsonStr ? JSON.parse(jsonStr) : null;
231
+ },
232
+
233
+ set(value) {
234
+ if (!value) {
235
+ return;
236
+ }
237
+
238
+ js_cookie.set(KEY, JSON.stringify(value), attributes);
239
+ }
240
+
241
+ };
242
+ };
243
+ }
244
+ ;// CONCATENATED MODULE: ./src/javascripts/lib/store/providers/session-storage.js
245
+ function store(key) {
246
+ const KEY = 'cvco.' + key;
247
+ return {
248
+ get() {
249
+ const candidates = [KEY, KEY.split('.').slice(0, -1).join('.')];
250
+ let val;
251
+
252
+ do {
253
+ val = sessionStorage.getItem(candidates[0]);
254
+ } while (candidates.shift() && !val);
255
+
256
+ return JSON.parse(val);
257
+ },
258
+
259
+ set(value) {
260
+ if (!value) {
261
+ return;
262
+ }
263
+
264
+ sessionStorage.setItem(KEY, JSON.stringify(value));
265
+ }
266
+
267
+ };
268
+ }
269
+ ;// CONCATENATED MODULE: ./src/javascripts/package/storage.js
270
+
271
+
272
+
273
+ module.exports = __webpack_exports__;
274
+ /******/ })()
275
+ ;
@@ -0,0 +1,2 @@
1
+ /*! For license information please see storage.min.js.LICENSE.txt */
2
+ (()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(){return{get:()=>{if(window.hasOwnProperty("SeamlyBridge"))try{return JSON.parse(SeamlyBridge.getData())}catch(e){return console.error("Unexpected or malformed data retrieved from bridge",e),{}}return window.seamlyBridgeData},set:e=>{window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.seamlyBridge&&window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(e)),window.hasOwnProperty("SeamlyBridge")&&SeamlyBridge.setData(JSON.stringify(e)),window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify(e))}}}function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}e.r(t),e.d(t,{appStorageProvider:()=>r,cookieStorageProvider:()=>i,sessionStorageProvider:()=>s});const o=function e(t,r){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=n({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+s}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),s=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(n[a]=t.read(s,a),e===a)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){o(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function i(e={}){return function(t){const r="cvco."+t;return{get(){const e=o.get(r);return e?JSON.parse(e):null},set(t){t&&o.set(r,JSON.stringify(t),e)}}}}function s(e){const t="cvco."+e;return{get(){const e=[t,t.split(".").slice(0,-1).join(".")];let r;do{r=sessionStorage.getItem(e[0])}while(e.shift()&&!r);return JSON.parse(r)},set(e){e&&sessionStorage.setItem(t,JSON.stringify(e))}}}module.exports=t})();
@@ -0,0 +1 @@
1
+ /*! js-cookie v3.0.1 | MIT */