toggle-components-library 1.39.19-beta.0 → 1.39.19-beta.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.
@@ -6388,34 +6388,6 @@ Function.prototype.toString = makeBuiltIn(function toString() {
6388
6388
  }, 'toString');
6389
6389
 
6390
6390
 
6391
- /***/ }),
6392
-
6393
- /***/ "13d5":
6394
- /***/ (function(module, exports, __webpack_require__) {
6395
-
6396
- "use strict";
6397
-
6398
- var $ = __webpack_require__("23e7");
6399
- var $reduce = __webpack_require__("d58f").left;
6400
- var arrayMethodIsStrict = __webpack_require__("a640");
6401
- var CHROME_VERSION = __webpack_require__("1212");
6402
- var IS_NODE = __webpack_require__("9adc");
6403
-
6404
- // Chrome 80-82 has a critical bug
6405
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
6406
- var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
6407
- var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
6408
-
6409
- // `Array.prototype.reduce` method
6410
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
6411
- $({ target: 'Array', proto: true, forced: FORCED }, {
6412
- reduce: function reduce(callbackfn /* , initialValue */) {
6413
- var length = arguments.length;
6414
- return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
6415
- }
6416
- });
6417
-
6418
-
6419
6391
  /***/ }),
6420
6392
 
6421
6393
  /***/ "13e9":
@@ -8355,25 +8327,6 @@ module.exports = function (iterator, kind, value) {
8355
8327
  };
8356
8328
 
8357
8329
 
8358
- /***/ }),
8359
-
8360
- /***/ "2ba4":
8361
- /***/ (function(module, exports, __webpack_require__) {
8362
-
8363
- "use strict";
8364
-
8365
- var NATIVE_BIND = __webpack_require__("40d5");
8366
-
8367
- var FunctionPrototype = Function.prototype;
8368
- var apply = FunctionPrototype.apply;
8369
- var call = FunctionPrototype.call;
8370
-
8371
- // eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe
8372
- module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
8373
- return call.apply(apply, arguments);
8374
- });
8375
-
8376
-
8377
8330
  /***/ }),
8378
8331
 
8379
8332
  /***/ "2baa":
@@ -16935,35 +16888,6 @@ module.exports = function (object, key, value) {
16935
16888
  /* unused harmony reexport * */
16936
16889
 
16937
16890
 
16938
- /***/ }),
16939
-
16940
- /***/ "8558":
16941
- /***/ (function(module, exports, __webpack_require__) {
16942
-
16943
- "use strict";
16944
-
16945
- /* global Bun, Deno -- detection */
16946
- var globalThis = __webpack_require__("cfe9");
16947
- var userAgent = __webpack_require__("b5db");
16948
- var classof = __webpack_require__("c6b6");
16949
-
16950
- var userAgentStartsWith = function (string) {
16951
- return userAgent.slice(0, string.length) === string;
16952
- };
16953
-
16954
- module.exports = (function () {
16955
- if (userAgentStartsWith('Bun/')) return 'BUN';
16956
- if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
16957
- if (userAgentStartsWith('Deno/')) return 'DENO';
16958
- if (userAgentStartsWith('Node.js/')) return 'NODE';
16959
- if (globalThis.Bun && typeof Bun.version == 'string') return 'BUN';
16960
- if (globalThis.Deno && typeof Deno.version == 'object') return 'DENO';
16961
- if (classof(globalThis.process) === 'process') return 'NODE';
16962
- if (globalThis.window && globalThis.document) return 'BROWSER';
16963
- return 'REST';
16964
- })();
16965
-
16966
-
16967
16891
  /***/ }),
16968
16892
 
16969
16893
  /***/ "861d":
@@ -18459,66 +18383,6 @@ function startOfMonth (dirtyDate) {
18459
18383
  module.exports = startOfMonth
18460
18384
 
18461
18385
 
18462
- /***/ }),
18463
-
18464
- /***/ "9485":
18465
- /***/ (function(module, exports, __webpack_require__) {
18466
-
18467
- "use strict";
18468
-
18469
- var $ = __webpack_require__("23e7");
18470
- var iterate = __webpack_require__("2266");
18471
- var aCallable = __webpack_require__("59ed");
18472
- var anObject = __webpack_require__("825a");
18473
- var getIteratorDirect = __webpack_require__("46c4");
18474
- var iteratorClose = __webpack_require__("2a62");
18475
- var iteratorHelperWithoutClosingOnEarlyError = __webpack_require__("f99f");
18476
- var apply = __webpack_require__("2ba4");
18477
- var fails = __webpack_require__("d039");
18478
-
18479
- var $TypeError = TypeError;
18480
-
18481
- // https://bugs.webkit.org/show_bug.cgi?id=291651
18482
- var FAILS_ON_INITIAL_UNDEFINED = fails(function () {
18483
- // eslint-disable-next-line es/no-iterator-prototype-reduce, es/no-array-prototype-keys, array-callback-return -- required for testing
18484
- [].keys().reduce(function () { /* empty */ }, undefined);
18485
- });
18486
-
18487
- var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError('reduce', $TypeError);
18488
-
18489
- // `Iterator.prototype.reduce` method
18490
- // https://tc39.es/ecma262/#sec-iterator.prototype.reduce
18491
- $({ target: 'Iterator', proto: true, real: true, forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError }, {
18492
- reduce: function reduce(reducer /* , initialValue */) {
18493
- anObject(this);
18494
- try {
18495
- aCallable(reducer);
18496
- } catch (error) {
18497
- iteratorClose(this, 'throw', error);
18498
- }
18499
-
18500
- var noInitial = arguments.length < 2;
18501
- var accumulator = noInitial ? undefined : arguments[1];
18502
- if (reduceWithoutClosingOnEarlyError) {
18503
- return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]);
18504
- }
18505
- var record = getIteratorDirect(this);
18506
- var counter = 0;
18507
- iterate(record, function (value) {
18508
- if (noInitial) {
18509
- noInitial = false;
18510
- accumulator = value;
18511
- } else {
18512
- accumulator = reducer(accumulator, value, counter);
18513
- }
18514
- counter++;
18515
- }, { IS_RECORD: true });
18516
- if (noInitial) throw new $TypeError('Reduce of empty iterator with no initial value');
18517
- return accumulator;
18518
- }
18519
- });
18520
-
18521
-
18522
18386
  /***/ }),
18523
18387
 
18524
18388
  /***/ "94ca":
@@ -19368,18 +19232,6 @@ module.exports = function (argument, usingIterator) {
19368
19232
  };
19369
19233
 
19370
19234
 
19371
- /***/ }),
19372
-
19373
- /***/ "9adc":
19374
- /***/ (function(module, exports, __webpack_require__) {
19375
-
19376
- "use strict";
19377
-
19378
- var ENVIRONMENT = __webpack_require__("8558");
19379
-
19380
- module.exports = ENVIRONMENT === 'NODE';
19381
-
19382
-
19383
19235
  /***/ }),
19384
19236
 
19385
19237
  /***/ "9bdd":
@@ -19850,24 +19702,6 @@ module.exports = startOfYear
19850
19702
  /* unused harmony reexport * */
19851
19703
 
19852
19704
 
19853
- /***/ }),
19854
-
19855
- /***/ "a640":
19856
- /***/ (function(module, exports, __webpack_require__) {
19857
-
19858
- "use strict";
19859
-
19860
- var fails = __webpack_require__("d039");
19861
-
19862
- module.exports = function (METHOD_NAME, argument) {
19863
- var method = [][METHOD_NAME];
19864
- return !!method && fails(function () {
19865
- // eslint-disable-next-line no-useless-call -- required for testing
19866
- method.call(null, argument || function () { return 1; }, 1);
19867
- });
19868
- };
19869
-
19870
-
19871
19705
  /***/ }),
19872
19706
 
19873
19707
  /***/ "a735":
@@ -35073,60 +34907,6 @@ function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) {
35073
34907
  module.exports = differenceInCalendarDays
35074
34908
 
35075
34909
 
35076
- /***/ }),
35077
-
35078
- /***/ "d58f":
35079
- /***/ (function(module, exports, __webpack_require__) {
35080
-
35081
- "use strict";
35082
-
35083
- var aCallable = __webpack_require__("59ed");
35084
- var toObject = __webpack_require__("7b0b");
35085
- var IndexedObject = __webpack_require__("44ad");
35086
- var lengthOfArrayLike = __webpack_require__("07fa");
35087
-
35088
- var $TypeError = TypeError;
35089
-
35090
- var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
35091
-
35092
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
35093
- var createMethod = function (IS_RIGHT) {
35094
- return function (that, callbackfn, argumentsLength, memo) {
35095
- var O = toObject(that);
35096
- var self = IndexedObject(O);
35097
- var length = lengthOfArrayLike(O);
35098
- aCallable(callbackfn);
35099
- if (length === 0 && argumentsLength < 2) throw new $TypeError(REDUCE_EMPTY);
35100
- var index = IS_RIGHT ? length - 1 : 0;
35101
- var i = IS_RIGHT ? -1 : 1;
35102
- if (argumentsLength < 2) while (true) {
35103
- if (index in self) {
35104
- memo = self[index];
35105
- index += i;
35106
- break;
35107
- }
35108
- index += i;
35109
- if (IS_RIGHT ? index < 0 : length <= index) {
35110
- throw new $TypeError(REDUCE_EMPTY);
35111
- }
35112
- }
35113
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
35114
- memo = callbackfn(memo, self[index], index, O);
35115
- }
35116
- return memo;
35117
- };
35118
- };
35119
-
35120
- module.exports = {
35121
- // `Array.prototype.reduce` method
35122
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
35123
- left: createMethod(false),
35124
- // `Array.prototype.reduceRight` method
35125
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
35126
- right: createMethod(true)
35127
- };
35128
-
35129
-
35130
34910
  /***/ }),
35131
34911
 
35132
34912
  /***/ "d69a":
@@ -53503,259 +53283,6 @@ var ToggleStatusBar_component = normalizeComponent(
53503
53283
  )
53504
53284
 
53505
53285
  /* harmony default export */ var ToggleStatusBar = (ToggleStatusBar_component.exports);
53506
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"23b5c533-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/percentagebar/TogglePercentageBar.vue?vue&type=template&id=6f30efd0
53507
- var TogglePercentageBarvue_type_template_id_6f30efd0_render = function render() {
53508
- var _vm = this,
53509
- _c = _vm._self._c;
53510
- return _c('div', {
53511
- staticClass: "toggle-percentage-bar",
53512
- style: _vm.wrapperStyle
53513
- }, [_vm.showLegend && _vm.legendItems.length ? _c('div', {
53514
- staticClass: "toggle-percentage-bar__legend"
53515
- }, _vm._l(_vm.legendItems, function (item) {
53516
- return _c('div', {
53517
- key: item.segmentIndex,
53518
- staticClass: "toggle-percentage-bar__legend-item"
53519
- }, [_c('span', {
53520
- staticClass: "toggle-percentage-bar__legend-swatch",
53521
- style: {
53522
- backgroundColor: item.colour
53523
- },
53524
- attrs: {
53525
- "aria-hidden": "true"
53526
- }
53527
- }), _c('span', {
53528
- staticClass: "toggle-percentage-bar__legend-text"
53529
- }, [_vm._v(_vm._s(item.text))])]);
53530
- }), 0) : _vm._e(), _c('div', {
53531
- staticClass: "toggle-percentage-bar__rail",
53532
- class: [_vm.sizeClass, {
53533
- 'toggle-percentage-bar--segment-tooltips': _vm.showSegmentPercentOnHover
53534
- }],
53535
- attrs: {
53536
- "role": "progressbar",
53537
- "aria-valuenow": _vm.ariaValueNow,
53538
- "aria-valuemin": "0",
53539
- "aria-valuemax": _vm.ariaValueMax
53540
- }
53541
- }, [_c('div', {
53542
- staticClass: "toggle-percentage-bar__track"
53543
- }, [_vm.fillWidthPercent > 0 ? _c('div', {
53544
- staticClass: "toggle-percentage-bar__track-fill",
53545
- style: {
53546
- width: _vm.fillWidthPercent + '%'
53547
- }
53548
- }, _vm._l(_vm.visibleDisplayRows, function (row) {
53549
- return _c('div', {
53550
- key: row.segmentIndex,
53551
- staticClass: "toggle-percentage-bar__segment",
53552
- class: {
53553
- 'toggle-percentage-bar__segment--hoverable': _vm.showSegmentPercentOnHover
53554
- },
53555
- style: _vm.segmentStyle(row)
53556
- }, [_vm.showSegmentPercentOnHover ? _c('span', {
53557
- staticClass: "toggle-percentage-bar__segment-tip"
53558
- }, [_vm._v(_vm._s(row.hoverText))]) : _vm._e()]);
53559
- }), 0) : _vm._e()])])]);
53560
- };
53561
- var TogglePercentageBarvue_type_template_id_6f30efd0_staticRenderFns = [];
53562
-
53563
- // CONCATENATED MODULE: ./src/components/percentagebar/TogglePercentageBar.vue?vue&type=template&id=6f30efd0
53564
-
53565
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reduce.js
53566
- var es_array_reduce = __webpack_require__("13d5");
53567
-
53568
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.reduce.js
53569
- var es_iterator_reduce = __webpack_require__("9485");
53570
-
53571
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/percentagebar/TogglePercentageBar.vue?vue&type=script&lang=js
53572
-
53573
-
53574
-
53575
-
53576
-
53577
- // Default palette: ToggleStatusBar background colours — complete, failed, stalled, processing, draft.
53578
- const DEFAULT_SEGMENT_COLOURS = ['#157FFC', '#439BFF', '#8DC2FF', '#C7E1FF', '#EBF4FF'];
53579
- function segmentValue(entry) {
53580
- if (!entry || typeof entry !== 'object') {
53581
- return 0;
53582
- }
53583
- const v = Number(entry.value);
53584
- return Number.isFinite(v) ? Math.max(0, v) : 0;
53585
- }
53586
- /* harmony default export */ var TogglePercentageBarvue_type_script_lang_js = ({
53587
- name: 'TogglePercentageBar',
53588
- props: {
53589
- total: {
53590
- type: Number,
53591
- required: true
53592
- },
53593
- segments: {
53594
- type: Array,
53595
- default() {
53596
- return [];
53597
- }
53598
- },
53599
- maxWidth: {
53600
- type: String,
53601
- default: undefined
53602
- },
53603
- size: {
53604
- type: String,
53605
- default: 'regular',
53606
- validator(value) {
53607
- return ['regular', 'small', 'extra-small'].indexOf(value) !== -1;
53608
- }
53609
- },
53610
- showSegmentPercentOnHover: {
53611
- type: Boolean,
53612
- default: false
53613
- },
53614
- showLegend: {
53615
- type: Boolean,
53616
- default: false
53617
- }
53618
- },
53619
- computed: {
53620
- sizeClass() {
53621
- if (this.size === 'small') {
53622
- return 'toggle-percentage-bar--small';
53623
- }
53624
- if (this.size === 'extra-small') {
53625
- return 'toggle-percentage-bar--extra-small';
53626
- }
53627
- return null;
53628
- },
53629
- wrapperStyle() {
53630
- if (!this.maxWidth) {
53631
- return {};
53632
- }
53633
- return {
53634
- maxWidth: this.maxWidth
53635
- };
53636
- },
53637
- normalizedValues() {
53638
- if (this.total <= 0 || !this.segments.length) {
53639
- return [];
53640
- }
53641
- const raw = this.segments.map(s => segmentValue(s));
53642
- const sum = raw.reduce((a, b) => a + b, 0);
53643
- if (sum <= 0) {
53644
- return raw.map(() => 0);
53645
- }
53646
- const scale = sum > this.total ? this.total / sum : 1;
53647
- return raw.map(v => v * scale);
53648
- },
53649
- displayRows() {
53650
- if (this.total <= 0) {
53651
- return [];
53652
- }
53653
- return this.segments.map((entry, index) => {
53654
- const normalized = this.normalizedValues[index] || 0;
53655
- const widthPercent = normalized / this.total * 100;
53656
- const colour = this.resolveSegmentColour(entry, index);
53657
- const percentStr = this.formatSegmentBarPercent(widthPercent);
53658
- const label = entry && typeof entry.label === 'string' && entry.label.trim() ? entry.label.trim() : '';
53659
- let hoverText = percentStr;
53660
- if (label) {
53661
- hoverText = `${label}: ${percentStr}`;
53662
- }
53663
- return {
53664
- segmentIndex: index,
53665
- widthPercent,
53666
- colour,
53667
- hoverText
53668
- };
53669
- });
53670
- },
53671
- visibleDisplayRows() {
53672
- return this.displayRows.filter(row => row.widthPercent > 0);
53673
- },
53674
- fillWidthPercent() {
53675
- return this.visibleDisplayRows.reduce((sum, row) => sum + row.widthPercent, 0);
53676
- },
53677
- filledTotal() {
53678
- return this.normalizedValues.reduce((a, b) => a + b, 0);
53679
- },
53680
- ariaValueNow() {
53681
- return Math.round(this.filledTotal * 100) / 100;
53682
- },
53683
- ariaValueMax() {
53684
- return this.total > 0 ? this.total : 1;
53685
- },
53686
- legendItems() {
53687
- if (!this.showLegend || !this.segments.length) {
53688
- return [];
53689
- }
53690
- return this.segments.map((entry, index) => {
53691
- var _this$normalizedValue;
53692
- const colour = this.resolveSegmentColour(entry, index);
53693
- const amount = (_this$normalizedValue = this.normalizedValues[index]) !== null && _this$normalizedValue !== void 0 ? _this$normalizedValue : 0;
53694
- const valueStr = this.formatLegendValue(amount);
53695
- const label = entry && typeof entry.label === 'string' && entry.label.trim() ? entry.label.trim() : '';
53696
- const text = label ? `${label}: ${valueStr}` : valueStr;
53697
- return {
53698
- segmentIndex: index,
53699
- colour,
53700
- text
53701
- };
53702
- });
53703
- }
53704
- },
53705
- methods: {
53706
- resolveSegmentColour(entry, index) {
53707
- if (entry && typeof entry.colour === 'string' && entry.colour.trim()) {
53708
- return entry.colour.trim();
53709
- }
53710
- return DEFAULT_SEGMENT_COLOURS[index % DEFAULT_SEGMENT_COLOURS.length];
53711
- },
53712
- segmentStyle(row) {
53713
- return {
53714
- flex: `${row.widthPercent} 1 0%`,
53715
- backgroundColor: row.colour
53716
- };
53717
- },
53718
- formatSegmentBarPercent(widthPercent) {
53719
- if (widthPercent <= 0) {
53720
- return '';
53721
- }
53722
- const rounded = Math.round(widthPercent * 10) / 10;
53723
- return `${rounded}%`;
53724
- },
53725
- formatLegendValue(amount) {
53726
- if (!Number.isFinite(amount)) {
53727
- return '0';
53728
- }
53729
- const rounded = Math.round(amount * 100) / 100;
53730
- if (Number.isInteger(rounded)) {
53731
- return String(rounded);
53732
- }
53733
- return String(rounded);
53734
- }
53735
- }
53736
- });
53737
- // CONCATENATED MODULE: ./src/components/percentagebar/TogglePercentageBar.vue?vue&type=script&lang=js
53738
- /* harmony default export */ var percentagebar_TogglePercentageBarvue_type_script_lang_js = (TogglePercentageBarvue_type_script_lang_js);
53739
- // CONCATENATED MODULE: ./src/components/percentagebar/TogglePercentageBar.vue
53740
-
53741
-
53742
-
53743
-
53744
-
53745
- /* normalize component */
53746
-
53747
- var TogglePercentageBar_component = normalizeComponent(
53748
- percentagebar_TogglePercentageBarvue_type_script_lang_js,
53749
- TogglePercentageBarvue_type_template_id_6f30efd0_render,
53750
- TogglePercentageBarvue_type_template_id_6f30efd0_staticRenderFns,
53751
- false,
53752
- null,
53753
- null,
53754
- null
53755
-
53756
- )
53757
-
53758
- /* harmony default export */ var TogglePercentageBar = (TogglePercentageBar_component.exports);
53759
53286
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"23b5c533-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/carousel/ToggleCarousel.vue?vue&type=template&id=f2b8ea76
53760
53287
  var ToggleCarouselvue_type_template_id_f2b8ea76_render = function render() {
53761
53288
  var _vm = this,
@@ -54366,7 +53893,6 @@ var main = __webpack_require__("dc44");
54366
53893
 
54367
53894
 
54368
53895
 
54369
-
54370
53896
 
54371
53897
 
54372
53898
  const Components = {
@@ -54437,7 +53963,6 @@ const Components = {
54437
53963
  ToggleBoosterModal: ToggleBoosterModal,
54438
53964
  ToggleContactSearch: ToggleContactSearch,
54439
53965
  ToggleStatusBar: ToggleStatusBar,
54440
- TogglePercentageBar: TogglePercentageBar,
54441
53966
  ToggleCarousel: ToggleCarousel,
54442
53967
  ToggleCarouselSlide: ToggleCarouselSlide,
54443
53968
  ToggleEmailCard: ToggleEmailCard,