@frollo/frollo-web-ui 9.0.13 → 9.0.15

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 (41) hide show
  1. package/cjs/index.js +324 -334
  2. package/esm/{_rollupPluginBabelHelpers-BKlDnZ7n.js → _rollupPluginBabelHelpers-BLtav7L4.js} +19 -32
  3. package/esm/fw-accordion.js +1 -1
  4. package/esm/fw-alert.js +1 -1
  5. package/esm/fw-bar-chart.js +1 -1
  6. package/esm/{fw-button-ChYejNWD.js → fw-button-CeUZjl-m.js} +3 -3
  7. package/esm/fw-button.js +2 -2
  8. package/esm/fw-date-picker.js +3 -3
  9. package/esm/fw-drawer.js +2 -2
  10. package/esm/{fw-dropdown-UJDWtWjF.js → fw-dropdown-Cn-AOd9J.js} +2 -2
  11. package/esm/fw-dropdown.js +5 -5
  12. package/esm/fw-icons.js +1 -1
  13. package/esm/{fw-image-fzUvzmLv.js → fw-image-DSZYmjep.js} +3 -3
  14. package/esm/fw-image.js +4 -4
  15. package/esm/fw-input.js +2 -2
  16. package/esm/fw-loading-bar-CMt4O4Ys.js +37 -0
  17. package/esm/fw-loading.js +1 -1
  18. package/esm/fw-media-picker.js +6 -6
  19. package/esm/fw-modal.js +10 -10
  20. package/esm/fw-navigation-menu.js +4 -4
  21. package/esm/{fw-popover-BFiv7Ich.js → fw-popover-Dv8DodUb.js} +19 -21
  22. package/esm/fw-popover.js +2 -2
  23. package/esm/fw-progress-bar.js +1 -1
  24. package/esm/fw-provider-list.js +7 -7
  25. package/esm/fw-sidebar-menu.js +2 -2
  26. package/esm/{fw-table-row-Be4_T3Ai.js → fw-table-row-CLb3Xliv.js} +3 -3
  27. package/esm/fw-table.js +4 -4
  28. package/esm/fw-tabs.js +2 -2
  29. package/esm/fw-tag.js +2 -2
  30. package/esm/fw-toast.js +1 -1
  31. package/esm/fw-transactions-card.js +4 -4
  32. package/esm/{index-v1DX6R2G.js → index-BdZ_WcnP.js} +175 -163
  33. package/esm/{index-Dg62eRFQ.js → index-vXNG2AyR.js} +80 -85
  34. package/esm/index.js +10 -10
  35. package/frollo-web-ui.esm.js +330 -338
  36. package/icons/index.ts +3 -1
  37. package/icons/lock-outline.svg +3 -0
  38. package/package.json +20 -19
  39. package/types/icons/index.d.ts +2 -1
  40. package/web-components/index.js +1124 -864
  41. package/esm/fw-loading-bar-CPzE92BH.js +0 -37
@@ -1,10 +1,10 @@
1
- import { c as _asyncToGenerator, d as _regeneratorRuntime, a as _slicedToArray, b as _toConsumableArray } from './_rollupPluginBabelHelpers-BKlDnZ7n.js';
1
+ import { c as _asyncToGenerator, d as _regenerator, a as _slicedToArray, b as _toConsumableArray } from './_rollupPluginBabelHelpers-BLtav7L4.js';
2
2
  import { h, render as render$1, defineComponent, ref, shallowRef, onBeforeUnmount, computed, watch, nextTick, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, toDisplayString, withCtx, withModifiers, normalizeClass, createTextVNode, createCommentVNode } from 'vue';
3
- import { e as render$2, f as render$3, g as render$4, h as render$5, i as render$6, j as render$7 } from './index-v1DX6R2G.js';
3
+ import { e as render$2, f as render$3, g as render$4, h as render$5, i as render$6, j as render$7 } from './index-BdZ_WcnP.js';
4
4
  import { FwModal as __default__ } from './fw-modal.js';
5
5
  import './fw-button.js';
6
6
  import { u as useColours } from './get-root-colours-DCCAnRF4.js';
7
- import { s as script$1 } from './fw-button-ChYejNWD.js';
7
+ import { s as script$1 } from './fw-button-CeUZjl-m.js';
8
8
  import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
9
9
 
10
10
  var getVueComponentHtml = function getVueComponentHtml(component, props) {
@@ -145,58 +145,57 @@ var script = defineComponent({
145
145
  watch(function () {
146
146
  return props.imageUrl;
147
147
  }, /*#__PURE__*/function () {
148
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(url) {
149
- var _bitmap$value2, _bitmap$value2$close, myToken, res, blob, mimeType, file;
150
- return _regeneratorRuntime().wrap(function _callee$(_context) {
151
- while (1) switch (_context.prev = _context.next) {
148
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(url) {
149
+ var _bitmap$value2, _bitmap$value2$close, myToken, res, blob, mimeType, file, _t;
150
+ return _regenerator().w(function (_context) {
151
+ while (1) switch (_context.p = _context.n) {
152
152
  case 0:
153
153
  if (url) {
154
- _context.next = 5;
154
+ _context.n = 1;
155
155
  break;
156
156
  }
157
157
  setFile(null);
158
158
  (_bitmap$value2 = bitmap.value) === null || _bitmap$value2 === void 0 || (_bitmap$value2$close = _bitmap$value2.close) === null || _bitmap$value2$close === void 0 || _bitmap$value2$close.call(_bitmap$value2);
159
159
  bitmap.value = null;
160
- return _context.abrupt("return");
161
- case 5:
160
+ return _context.a(2);
161
+ case 1:
162
162
  myToken = ++fetchToken;
163
163
  loading.value = true;
164
- _context.prev = 7;
165
- _context.next = 10;
164
+ _context.p = 2;
165
+ _context.n = 3;
166
166
  return fetch(url);
167
- case 10:
168
- res = _context.sent;
169
- _context.next = 13;
167
+ case 3:
168
+ res = _context.v;
169
+ _context.n = 4;
170
170
  return res.blob();
171
- case 13:
172
- blob = _context.sent;
171
+ case 4:
172
+ blob = _context.v;
173
173
  mimeType = res.headers.get('Content-Type') || blob.type;
174
174
  file = new File([blob], 'image', {
175
175
  type: mimeType
176
176
  });
177
177
  if (!(myToken !== fetchToken)) {
178
- _context.next = 18;
178
+ _context.n = 5;
179
179
  break;
180
180
  }
181
- return _context.abrupt("return");
182
- case 18:
181
+ return _context.a(2);
182
+ case 5:
183
183
  // stale fetch
184
184
  setFile(file);
185
- _context.next = 24;
185
+ _context.n = 7;
186
186
  break;
187
- case 21:
188
- _context.prev = 21;
189
- _context.t0 = _context["catch"](7);
190
- console.error('Error fetching image:', _context.t0);
191
- case 24:
192
- _context.prev = 24;
187
+ case 6:
188
+ _context.p = 6;
189
+ _t = _context.v;
190
+ console.error('Error fetching image:', _t);
191
+ case 7:
192
+ _context.p = 7;
193
193
  if (myToken === fetchToken) loading.value = false;
194
- return _context.finish(24);
195
- case 27:
196
- case "end":
197
- return _context.stop();
194
+ return _context.f(7);
195
+ case 8:
196
+ return _context.a(2);
198
197
  }
199
- }, _callee, null, [[7, 21, 24, 27]]);
198
+ }, _callee, null, [[2, 6, 7, 8]]);
200
199
  }));
201
200
  return function (_x) {
202
201
  return _ref2.apply(this, arguments);
@@ -207,46 +206,45 @@ var script = defineComponent({
207
206
  // Decode bitmap once per file
208
207
  var decodeToken = 0;
209
208
  watch(selectedFile, /*#__PURE__*/function () {
210
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file) {
209
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(file) {
211
210
  var _bitmap$value3, _bitmap$value3$close;
212
- var myToken, bm, _bm$close;
213
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
214
- while (1) switch (_context2.prev = _context2.next) {
211
+ var myToken, bm, _bm$close, _t2;
212
+ return _regenerator().w(function (_context2) {
213
+ while (1) switch (_context2.p = _context2.n) {
215
214
  case 0:
216
215
  (_bitmap$value3 = bitmap.value) === null || _bitmap$value3 === void 0 || (_bitmap$value3$close = _bitmap$value3.close) === null || _bitmap$value3$close === void 0 || _bitmap$value3$close.call(_bitmap$value3);
217
216
  bitmap.value = null;
218
217
  if (file) {
219
- _context2.next = 4;
218
+ _context2.n = 1;
220
219
  break;
221
220
  }
222
- return _context2.abrupt("return");
223
- case 4:
221
+ return _context2.a(2);
222
+ case 1:
224
223
  myToken = ++decodeToken;
225
- _context2.prev = 5;
226
- _context2.next = 8;
224
+ _context2.p = 2;
225
+ _context2.n = 3;
227
226
  return createImageBitmap(file);
228
- case 8:
229
- bm = _context2.sent;
227
+ case 3:
228
+ bm = _context2.v;
230
229
  if (!(myToken !== decodeToken)) {
231
- _context2.next = 12;
230
+ _context2.n = 4;
232
231
  break;
233
232
  }
234
233
  (_bm$close = bm.close) === null || _bm$close === void 0 || _bm$close.call(bm);
235
- return _context2.abrupt("return");
236
- case 12:
234
+ return _context2.a(2);
235
+ case 4:
237
236
  bitmap.value = bm;
238
237
  if (isEditMediaModalOpen.value) scheduleDraw();
239
- _context2.next = 19;
238
+ _context2.n = 6;
240
239
  break;
241
- case 16:
242
- _context2.prev = 16;
243
- _context2.t0 = _context2["catch"](5);
244
- console.error('Error decoding bitmap:', _context2.t0);
245
- case 19:
246
- case "end":
247
- return _context2.stop();
240
+ case 5:
241
+ _context2.p = 5;
242
+ _t2 = _context2.v;
243
+ console.error('Error decoding bitmap:', _t2);
244
+ case 6:
245
+ return _context2.a(2);
248
246
  }
249
- }, _callee2, null, [[5, 16]]);
247
+ }, _callee2, null, [[2, 5]]);
250
248
  }));
251
249
  return function (_x2) {
252
250
  return _ref3.apply(this, arguments);
@@ -296,22 +294,21 @@ var script = defineComponent({
296
294
  var scheduleDraw = function scheduleDraw() {
297
295
  var save = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
298
296
  if (rafId != null) return;
299
- rafId = requestAnimationFrame(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
300
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
301
- while (1) switch (_context3.prev = _context3.next) {
297
+ rafId = requestAnimationFrame(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
298
+ return _regenerator().w(function (_context3) {
299
+ while (1) switch (_context3.n) {
302
300
  case 0:
303
301
  rafId = null;
304
- _context3.next = 3;
302
+ _context3.n = 1;
305
303
  return drawImageOnCanvas(save);
306
- case 3:
307
- case "end":
308
- return _context3.stop();
304
+ case 1:
305
+ return _context3.a(2);
309
306
  }
310
307
  }, _callee3);
311
308
  })));
312
309
  };
313
310
  var drawImageOnCanvas = /*#__PURE__*/function () {
314
- var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
311
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
315
312
  var save,
316
313
  canvas,
317
314
  bm,
@@ -330,25 +327,25 @@ var script = defineComponent({
330
327
  cx,
331
328
  cy,
332
329
  _args4 = arguments;
333
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
334
- while (1) switch (_context4.prev = _context4.next) {
330
+ return _regenerator().w(function (_context4) {
331
+ while (1) switch (_context4.n) {
335
332
  case 0:
336
333
  save = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : false;
337
334
  canvas = editorCanvas.value;
338
335
  bm = bitmap.value;
339
336
  if (!(!canvas || !bm)) {
340
- _context4.next = 5;
337
+ _context4.n = 1;
341
338
  break;
342
339
  }
343
- return _context4.abrupt("return");
344
- case 5:
340
+ return _context4.a(2);
341
+ case 1:
345
342
  ctx = canvas.getContext('2d');
346
343
  if (ctx) {
347
- _context4.next = 8;
344
+ _context4.n = 2;
348
345
  break;
349
346
  }
350
- return _context4.abrupt("return");
351
- case 8:
347
+ return _context4.a(2);
348
+ case 2:
352
349
  imgW = bm.width, imgH = bm.height;
353
350
  cW = canvas.width, cH = canvas.height;
354
351
  ctx.clearRect(0, 0, cW, cH);
@@ -374,9 +371,8 @@ var script = defineComponent({
374
371
  ctx.fillRect(cx, cy, squareSize, squareSize);
375
372
  }
376
373
  }
377
- case 14:
378
- case "end":
379
- return _context4.stop();
374
+ case 3:
375
+ return _context4.a(2);
380
376
  }
381
377
  }, _callee4);
382
378
  }));
@@ -480,21 +476,21 @@ var script = defineComponent({
480
476
  scheduleDraw();
481
477
  };
482
478
  var save = /*#__PURE__*/function () {
483
- var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
479
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
484
480
  var canvas;
485
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
486
- while (1) switch (_context5.prev = _context5.next) {
481
+ return _regenerator().w(function (_context5) {
482
+ while (1) switch (_context5.n) {
487
483
  case 0:
488
484
  canvas = editorCanvas.value;
489
485
  if (canvas) {
490
- _context5.next = 3;
486
+ _context5.n = 1;
491
487
  break;
492
488
  }
493
- return _context5.abrupt("return");
494
- case 3:
495
- _context5.next = 5;
489
+ return _context5.a(2);
490
+ case 1:
491
+ _context5.n = 2;
496
492
  return drawImageOnCanvas(true);
497
- case 5:
493
+ case 2:
498
494
  canvas.toBlob(function (blob) {
499
495
  if (!blob) return;
500
496
  var file = new File([blob], 'edited-image.png', {
@@ -505,9 +501,8 @@ var script = defineComponent({
505
501
  isEditMediaModalOpen.value = false;
506
502
  clearEdits();
507
503
  }, 'image/png');
508
- case 6:
509
- case "end":
510
- return _context5.stop();
504
+ case 3:
505
+ return _context5.a(2);
511
506
  }
512
507
  }, _callee5);
513
508
  }));
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as _objectSpread2, a as _slicedToArray } from './_rollupPluginBabelHelpers-BKlDnZ7n.js';
1
+ import { _ as _objectSpread2, a as _slicedToArray } from './_rollupPluginBabelHelpers-BLtav7L4.js';
2
2
  import './fw-form.js';
3
3
  import './fw-input.js';
4
4
  import { FwCheckbox as __default__$2 } from './fw-checkbox.js';
@@ -23,25 +23,25 @@ import { FwDrawer as __default__$4 } from './fw-drawer.js';
23
23
  import { FwProviderList as __default__$a } from './fw-provider-list.js';
24
24
  import { FwDatePicker as __default__$3 } from './fw-date-picker.js';
25
25
  import './fw-popover.js';
26
- import { s as script$7 } from './index-Dg62eRFQ.js';
27
- export { g as getVueComponentHtml } from './index-Dg62eRFQ.js';
26
+ import { s as script$7 } from './index-vXNG2AyR.js';
27
+ export { g as getVueComponentHtml } from './index-vXNG2AyR.js';
28
28
  import { FwSlider as script$b } from './fw-slider.js';
29
29
  import { FwBarChart as script$1 } from './fw-bar-chart.js';
30
30
  import { FwSuccessAnimation as script$c } from './fw-icons.js';
31
- import { s as script$2 } from './fw-button-ChYejNWD.js';
31
+ import { s as script$2 } from './fw-button-CeUZjl-m.js';
32
32
  import { _ as __default__$1 } from './fw-card-DJXjRPUR.js';
33
- import { _ as __default__$5 } from './fw-dropdown-UJDWtWjF.js';
33
+ import { _ as __default__$5 } from './fw-dropdown-Cn-AOd9J.js';
34
34
  import { F as Form } from './vee-validate-0dtT5GSQ.js';
35
- import { _ as __default__$6 } from './fw-image-fzUvzmLv.js';
35
+ import { _ as __default__$6 } from './fw-image-DSZYmjep.js';
36
36
  import { _ as __default__$7 } from './fw-input-HqJer3qu.js';
37
- import { s as script$3 } from './fw-loading-bar-CPzE92BH.js';
38
- import { _ as __default__$9 } from './fw-popover-BFiv7Ich.js';
39
- import { _ as __default__$b, s as script$f, a as script$g } from './fw-table-row-Be4_T3Ai.js';
37
+ import { s as script$3 } from './fw-loading-bar-CMt4O4Ys.js';
38
+ import { _ as __default__$9 } from './fw-popover-Dv8DodUb.js';
39
+ import { _ as __default__$b, s as script$f, a as script$g } from './fw-table-row-CLb3Xliv.js';
40
40
  import { reactive, createApp, h } from 'vue';
41
41
  export { g as getHexWithOpacity, u as useColours } from './get-root-colours-DCCAnRF4.js';
42
42
  import './uniqueId-DK6xzFd8.js';
43
43
  import './style-inject.es-tgCJW-Cu.js';
44
- import './index-v1DX6R2G.js';
44
+ import './index-BdZ_WcnP.js';
45
45
  import './index-BVcOAKar.js';
46
46
 
47
47
  // Form components