@learncard/react 2.6.11 → 2.6.13
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/{CircleIcon-a45953f5.js → CircleIcon-49625a42.js} +21 -7
- package/dist/cjs/CircleIcon-49625a42.js.map +1 -0
- package/dist/cjs/{Lightbox-31a90d97.js → Lightbox-f19e13d2.js} +32 -10
- package/dist/cjs/Lightbox-f19e13d2.js.map +1 -0
- package/dist/cjs/{VCCard-579989b4.js → VCCard-2459aa7b.js} +2 -2
- package/dist/cjs/{VCCard-579989b4.js.map → VCCard-2459aa7b.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-30a3240b.js → VCDisplayCard2-74b0ebb3.js} +12 -6
- package/dist/cjs/VCDisplayCard2-74b0ebb3.js.map +1 -0
- package/dist/cjs/{constants-a9665278.js → constants-c8facd10.js} +6 -4
- package/dist/cjs/constants-c8facd10.js.map +1 -0
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index12.js +5 -5
- package/dist/cjs/index18.js +1 -1
- package/dist/cjs/index27.js +3 -2
- package/dist/cjs/index27.js.map +1 -1
- package/dist/cjs/index35.js +3 -3
- package/dist/cjs/index38.js +2 -2
- package/dist/cjs/index7.js +2 -1
- package/dist/cjs/index7.js.map +1 -1
- package/dist/esm/{CircleIcon-38b874e2.js → CircleIcon-73f61efe.js} +21 -7
- package/dist/esm/CircleIcon-73f61efe.js.map +1 -0
- package/dist/esm/{Lightbox-35809729.js → Lightbox-a1aab9ea.js} +33 -11
- package/dist/esm/Lightbox-a1aab9ea.js.map +1 -0
- package/dist/esm/{VCCard-7cb07eaf.js → VCCard-64fcfc4b.js} +2 -2
- package/dist/esm/{VCCard-7cb07eaf.js.map → VCCard-64fcfc4b.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-80423d2b.js → VCDisplayCard2-e7171835.js} +12 -6
- package/dist/esm/VCDisplayCard2-e7171835.js.map +1 -0
- package/dist/esm/{constants-af6897d5.js → constants-f57283aa.js} +6 -4
- package/dist/esm/constants-f57283aa.js.map +1 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/index12.js +5 -5
- package/dist/esm/index18.js +1 -1
- package/dist/esm/index27.js +3 -2
- package/dist/esm/index27.js.map +1 -1
- package/dist/esm/index35.js +3 -3
- package/dist/esm/index38.js +2 -2
- package/dist/esm/index7.js +2 -1
- package/dist/esm/index7.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/CircleIcon-a45953f5.js.map +0 -1
- package/dist/cjs/Lightbox-31a90d97.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-30a3240b.js.map +0 -1
- package/dist/cjs/constants-a9665278.js.map +0 -1
- package/dist/esm/CircleIcon-38b874e2.js.map +0 -1
- package/dist/esm/Lightbox-35809729.js.map +0 -1
- package/dist/esm/VCDisplayCard2-80423d2b.js.map +0 -1
- package/dist/esm/constants-af6897d5.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
+
var CircleSpinner = require('./CircleSpinner-093cce04.js');
|
|
4
5
|
var index = require('./index-d836b84d.js');
|
|
5
6
|
var icons = require('./icons-ac6eb6ec.js');
|
|
6
7
|
|
|
@@ -1031,13 +1032,18 @@ const CountCircle = ({
|
|
|
1031
1032
|
className,
|
|
1032
1033
|
onClick = () => {
|
|
1033
1034
|
},
|
|
1034
|
-
bgColor = "bg-grayscale-50"
|
|
1035
|
+
bgColor = "bg-grayscale-50",
|
|
1036
|
+
loading
|
|
1035
1037
|
}) => {
|
|
1036
1038
|
const _count = count >= 1e3 ? numeral(count).format("0.0a") : count;
|
|
1039
|
+
const circleLoadingState = loading ? CircleSpinner.CircleLoadingState.spin : CircleSpinner.CircleLoadingState.stop;
|
|
1037
1040
|
const style = {
|
|
1038
1041
|
width: size,
|
|
1039
1042
|
height: size,
|
|
1040
|
-
padding: innerPadding
|
|
1043
|
+
padding: !loading ? innerPadding : "0px"
|
|
1044
|
+
};
|
|
1045
|
+
const spinnerStyle = {
|
|
1046
|
+
transform: "translateX(-2px) translateY(1px)"
|
|
1041
1047
|
};
|
|
1042
1048
|
return /* @__PURE__ */ React__default["default"].createElement("section", {
|
|
1043
1049
|
onClick,
|
|
@@ -1045,9 +1051,15 @@ const CountCircle = ({
|
|
|
1045
1051
|
style
|
|
1046
1052
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1047
1053
|
className: `h-full`
|
|
1048
|
-
}, /* @__PURE__ */ React__default["default"].createElement("p", {
|
|
1054
|
+
}, !loading && count && /* @__PURE__ */ React__default["default"].createElement("p", {
|
|
1049
1055
|
className: "h-full line-clamp-1 font-semibold text-grayscale-900 text-[12px]"
|
|
1050
|
-
}, _count)
|
|
1056
|
+
}, _count), loading && /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1057
|
+
style: spinnerStyle
|
|
1058
|
+
}, /* @__PURE__ */ React__default["default"].createElement(CircleSpinner.CircleSpinner, {
|
|
1059
|
+
loadingState: circleLoadingState,
|
|
1060
|
+
thickness: 3,
|
|
1061
|
+
size: 20
|
|
1062
|
+
}))));
|
|
1051
1063
|
};
|
|
1052
1064
|
const CircleIcon = ({
|
|
1053
1065
|
iconSrc = icons.ICONS_TO_SOURCE[index.Icons.coinsIcon],
|
|
@@ -1056,7 +1068,8 @@ const CircleIcon = ({
|
|
|
1056
1068
|
innerPadding = "6px",
|
|
1057
1069
|
onClick = () => {
|
|
1058
1070
|
},
|
|
1059
|
-
bgColor = "bg-grayscale-900"
|
|
1071
|
+
bgColor = "bg-grayscale-900",
|
|
1072
|
+
loading
|
|
1060
1073
|
}) => {
|
|
1061
1074
|
const style = {
|
|
1062
1075
|
width: size,
|
|
@@ -1070,7 +1083,8 @@ const CircleIcon = ({
|
|
|
1070
1083
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1071
1084
|
className: `relative w-full h-full`
|
|
1072
1085
|
}, /* @__PURE__ */ React__default["default"].createElement(CountCircle, {
|
|
1073
|
-
count
|
|
1086
|
+
count,
|
|
1087
|
+
loading
|
|
1074
1088
|
}), /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
1075
1089
|
className: "h-full w-full object-cover",
|
|
1076
1090
|
src: iconSrc != null ? iconSrc : "",
|
|
@@ -1080,4 +1094,4 @@ const CircleIcon = ({
|
|
|
1080
1094
|
|
|
1081
1095
|
exports.CircleIcon = CircleIcon;
|
|
1082
1096
|
exports.CountCircle = CountCircle;
|
|
1083
|
-
//# sourceMappingURL=CircleIcon-
|
|
1097
|
+
//# sourceMappingURL=CircleIcon-49625a42.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircleIcon-49625a42.js","sources":["../../../../node_modules/.pnpm/numeral@2.0.6/node_modules/numeral/numeral.js","../../src/components/CircleIcon/CircleIcon.tsx"],"sourcesContent":["/*! @preserve\n * numeral.js\n * version : 2.0.6\n * author : Adam Draper\n * license : MIT\n * http://adamwdraper.github.com/Numeral-js/\n */\n\n(function (global, factory) {\n if (typeof define === 'function' && define.amd) {\n define(factory);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = factory();\n } else {\n global.numeral = factory();\n }\n}(this, function () {\n /************************************\n Variables\n ************************************/\n\n var numeral,\n _,\n VERSION = '2.0.6',\n formats = {},\n locales = {},\n defaults = {\n currentLocale: 'en',\n zeroFormat: null,\n nullFormat: null,\n defaultFormat: '0,0',\n scalePercentBy100: true\n },\n options = {\n currentLocale: defaults.currentLocale,\n zeroFormat: defaults.zeroFormat,\n nullFormat: defaults.nullFormat,\n defaultFormat: defaults.defaultFormat,\n scalePercentBy100: defaults.scalePercentBy100\n };\n\n\n /************************************\n Constructors\n ************************************/\n\n // Numeral prototype object\n function Numeral(input, number) {\n this._input = input;\n\n this._value = number;\n }\n\n numeral = function(input) {\n var value,\n kind,\n unformatFunction,\n regexp;\n\n if (numeral.isNumeral(input)) {\n value = input.value();\n } else if (input === 0 || typeof input === 'undefined') {\n value = 0;\n } else if (input === null || _.isNaN(input)) {\n value = null;\n } else if (typeof input === 'string') {\n if (options.zeroFormat && input === options.zeroFormat) {\n value = 0;\n } else if (options.nullFormat && input === options.nullFormat || !input.replace(/[^0-9]+/g, '').length) {\n value = null;\n } else {\n for (kind in formats) {\n regexp = typeof formats[kind].regexps.unformat === 'function' ? formats[kind].regexps.unformat() : formats[kind].regexps.unformat;\n\n if (regexp && input.match(regexp)) {\n unformatFunction = formats[kind].unformat;\n\n break;\n }\n }\n\n unformatFunction = unformatFunction || numeral._.stringToNumber;\n\n value = unformatFunction(input);\n }\n } else {\n value = Number(input)|| null;\n }\n\n return new Numeral(input, value);\n };\n\n // version number\n numeral.version = VERSION;\n\n // compare numeral object\n numeral.isNumeral = function(obj) {\n return obj instanceof Numeral;\n };\n\n // helper functions\n numeral._ = _ = {\n // formats numbers separators, decimals places, signs, abbreviations\n numberToFormat: function(value, format, roundingFunction) {\n var locale = locales[numeral.options.currentLocale],\n negP = false,\n optDec = false,\n leadingCount = 0,\n abbr = '',\n trillion = 1000000000000,\n billion = 1000000000,\n million = 1000000,\n thousand = 1000,\n decimal = '',\n neg = false,\n abbrForce, // force abbreviation\n abs,\n min,\n max,\n power,\n int,\n precision,\n signed,\n thousands,\n output;\n\n // make sure we never format a null value\n value = value || 0;\n\n abs = Math.abs(value);\n\n // see if we should use parentheses for negative number or if we should prefix with a sign\n // if both are present we default to parentheses\n if (numeral._.includes(format, '(')) {\n negP = true;\n format = format.replace(/[\\(|\\)]/g, '');\n } else if (numeral._.includes(format, '+') || numeral._.includes(format, '-')) {\n signed = numeral._.includes(format, '+') ? format.indexOf('+') : value < 0 ? format.indexOf('-') : -1;\n format = format.replace(/[\\+|\\-]/g, '');\n }\n\n // see if abbreviation is wanted\n if (numeral._.includes(format, 'a')) {\n abbrForce = format.match(/a(k|m|b|t)?/);\n\n abbrForce = abbrForce ? abbrForce[1] : false;\n\n // check for space before abbreviation\n if (numeral._.includes(format, ' a')) {\n abbr = ' ';\n }\n\n format = format.replace(new RegExp(abbr + 'a[kmbt]?'), '');\n\n if (abs >= trillion && !abbrForce || abbrForce === 't') {\n // trillion\n abbr += locale.abbreviations.trillion;\n value = value / trillion;\n } else if (abs < trillion && abs >= billion && !abbrForce || abbrForce === 'b') {\n // billion\n abbr += locale.abbreviations.billion;\n value = value / billion;\n } else if (abs < billion && abs >= million && !abbrForce || abbrForce === 'm') {\n // million\n abbr += locale.abbreviations.million;\n value = value / million;\n } else if (abs < million && abs >= thousand && !abbrForce || abbrForce === 'k') {\n // thousand\n abbr += locale.abbreviations.thousand;\n value = value / thousand;\n }\n }\n\n // check for optional decimals\n if (numeral._.includes(format, '[.]')) {\n optDec = true;\n format = format.replace('[.]', '.');\n }\n\n // break number and format\n int = value.toString().split('.')[0];\n precision = format.split('.')[1];\n thousands = format.indexOf(',');\n leadingCount = (format.split('.')[0].split(',')[0].match(/0/g) || []).length;\n\n if (precision) {\n if (numeral._.includes(precision, '[')) {\n precision = precision.replace(']', '');\n precision = precision.split('[');\n decimal = numeral._.toFixed(value, (precision[0].length + precision[1].length), roundingFunction, precision[1].length);\n } else {\n decimal = numeral._.toFixed(value, precision.length, roundingFunction);\n }\n\n int = decimal.split('.')[0];\n\n if (numeral._.includes(decimal, '.')) {\n decimal = locale.delimiters.decimal + decimal.split('.')[1];\n } else {\n decimal = '';\n }\n\n if (optDec && Number(decimal.slice(1)) === 0) {\n decimal = '';\n }\n } else {\n int = numeral._.toFixed(value, 0, roundingFunction);\n }\n\n // check abbreviation again after rounding\n if (abbr && !abbrForce && Number(int) >= 1000 && abbr !== locale.abbreviations.trillion) {\n int = String(Number(int) / 1000);\n\n switch (abbr) {\n case locale.abbreviations.thousand:\n abbr = locale.abbreviations.million;\n break;\n case locale.abbreviations.million:\n abbr = locale.abbreviations.billion;\n break;\n case locale.abbreviations.billion:\n abbr = locale.abbreviations.trillion;\n break;\n }\n }\n\n\n // format number\n if (numeral._.includes(int, '-')) {\n int = int.slice(1);\n neg = true;\n }\n\n if (int.length < leadingCount) {\n for (var i = leadingCount - int.length; i > 0; i--) {\n int = '0' + int;\n }\n }\n\n if (thousands > -1) {\n int = int.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1' + locale.delimiters.thousands);\n }\n\n if (format.indexOf('.') === 0) {\n int = '';\n }\n\n output = int + decimal + (abbr ? abbr : '');\n\n if (negP) {\n output = (negP && neg ? '(' : '') + output + (negP && neg ? ')' : '');\n } else {\n if (signed >= 0) {\n output = signed === 0 ? (neg ? '-' : '+') + output : output + (neg ? '-' : '+');\n } else if (neg) {\n output = '-' + output;\n }\n }\n\n return output;\n },\n // unformats numbers separators, decimals places, signs, abbreviations\n stringToNumber: function(string) {\n var locale = locales[options.currentLocale],\n stringOriginal = string,\n abbreviations = {\n thousand: 3,\n million: 6,\n billion: 9,\n trillion: 12\n },\n abbreviation,\n value,\n i,\n regexp;\n\n if (options.zeroFormat && string === options.zeroFormat) {\n value = 0;\n } else if (options.nullFormat && string === options.nullFormat || !string.replace(/[^0-9]+/g, '').length) {\n value = null;\n } else {\n value = 1;\n\n if (locale.delimiters.decimal !== '.') {\n string = string.replace(/\\./g, '').replace(locale.delimiters.decimal, '.');\n }\n\n for (abbreviation in abbreviations) {\n regexp = new RegExp('[^a-zA-Z]' + locale.abbreviations[abbreviation] + '(?:\\\\)|(\\\\' + locale.currency.symbol + ')?(?:\\\\))?)?$');\n\n if (stringOriginal.match(regexp)) {\n value *= Math.pow(10, abbreviations[abbreviation]);\n break;\n }\n }\n\n // check for negative number\n value *= (string.split('-').length + Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2 ? 1 : -1;\n\n // remove non numbers\n string = string.replace(/[^0-9\\.]+/g, '');\n\n value *= Number(string);\n }\n\n return value;\n },\n isNaN: function(value) {\n return typeof value === 'number' && isNaN(value);\n },\n includes: function(string, search) {\n return string.indexOf(search) !== -1;\n },\n insert: function(string, subString, start) {\n return string.slice(0, start) + subString + string.slice(start);\n },\n reduce: function(array, callback /*, initialValue*/) {\n if (this === null) {\n throw new TypeError('Array.prototype.reduce called on null or undefined');\n }\n\n if (typeof callback !== 'function') {\n throw new TypeError(callback + ' is not a function');\n }\n\n var t = Object(array),\n len = t.length >>> 0,\n k = 0,\n value;\n\n if (arguments.length === 3) {\n value = arguments[2];\n } else {\n while (k < len && !(k in t)) {\n k++;\n }\n\n if (k >= len) {\n throw new TypeError('Reduce of empty array with no initial value');\n }\n\n value = t[k++];\n }\n for (; k < len; k++) {\n if (k in t) {\n value = callback(value, t[k], k, t);\n }\n }\n return value;\n },\n /**\n * Computes the multiplier necessary to make x >= 1,\n * effectively eliminating miscalculations caused by\n * finite precision.\n */\n multiplier: function (x) {\n var parts = x.toString().split('.');\n\n return parts.length < 2 ? 1 : Math.pow(10, parts[1].length);\n },\n /**\n * Given a variable number of arguments, returns the maximum\n * multiplier that must be used to normalize an operation involving\n * all of them.\n */\n correctionFactor: function () {\n var args = Array.prototype.slice.call(arguments);\n\n return args.reduce(function(accum, next) {\n var mn = _.multiplier(next);\n return accum > mn ? accum : mn;\n }, 1);\n },\n /**\n * Implementation of toFixed() that treats floats more like decimals\n *\n * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present\n * problems for accounting- and finance-related software.\n */\n toFixed: function(value, maxDecimals, roundingFunction, optionals) {\n var splitValue = value.toString().split('.'),\n minDecimals = maxDecimals - (optionals || 0),\n boundedPrecision,\n optionalsRegExp,\n power,\n output;\n\n // Use the smallest precision value possible to avoid errors from floating point representation\n if (splitValue.length === 2) {\n boundedPrecision = Math.min(Math.max(splitValue[1].length, minDecimals), maxDecimals);\n } else {\n boundedPrecision = minDecimals;\n }\n\n power = Math.pow(10, boundedPrecision);\n\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + boundedPrecision) / power).toFixed(boundedPrecision);\n\n if (optionals > maxDecimals - boundedPrecision) {\n optionalsRegExp = new RegExp('\\\\.?0{1,' + (optionals - (maxDecimals - boundedPrecision)) + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }\n };\n\n // avaliable options\n numeral.options = options;\n\n // avaliable formats\n numeral.formats = formats;\n\n // avaliable formats\n numeral.locales = locales;\n\n // This function sets the current locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n numeral.locale = function(key) {\n if (key) {\n options.currentLocale = key.toLowerCase();\n }\n\n return options.currentLocale;\n };\n\n // This function provides access to the loaded locale data. If\n // no arguments are passed in, it will simply return the current\n // global locale object.\n numeral.localeData = function(key) {\n if (!key) {\n return locales[options.currentLocale];\n }\n\n key = key.toLowerCase();\n\n if (!locales[key]) {\n throw new Error('Unknown locale : ' + key);\n }\n\n return locales[key];\n };\n\n numeral.reset = function() {\n for (var property in defaults) {\n options[property] = defaults[property];\n }\n };\n\n numeral.zeroFormat = function(format) {\n options.zeroFormat = typeof(format) === 'string' ? format : null;\n };\n\n numeral.nullFormat = function (format) {\n options.nullFormat = typeof(format) === 'string' ? format : null;\n };\n\n numeral.defaultFormat = function(format) {\n options.defaultFormat = typeof(format) === 'string' ? format : '0.0';\n };\n\n numeral.register = function(type, name, format) {\n name = name.toLowerCase();\n\n if (this[type + 's'][name]) {\n throw new TypeError(name + ' ' + type + ' already registered.');\n }\n\n this[type + 's'][name] = format;\n\n return format;\n };\n\n\n numeral.validate = function(val, culture) {\n var _decimalSep,\n _thousandSep,\n _currSymbol,\n _valArray,\n _abbrObj,\n _thousandRegEx,\n localeData,\n temp;\n\n //coerce val to string\n if (typeof val !== 'string') {\n val += '';\n\n if (console.warn) {\n console.warn('Numeral.js: Value is not string. It has been co-erced to: ', val);\n }\n }\n\n //trim whitespaces from either sides\n val = val.trim();\n\n //if val is just digits return true\n if (!!val.match(/^\\d+$/)) {\n return true;\n }\n\n //if val is empty return false\n if (val === '') {\n return false;\n }\n\n //get the decimal and thousands separator from numeral.localeData\n try {\n //check if the culture is understood by numeral. if not, default it to current locale\n localeData = numeral.localeData(culture);\n } catch (e) {\n localeData = numeral.localeData(numeral.locale());\n }\n\n //setup the delimiters and currency symbol based on culture/locale\n _currSymbol = localeData.currency.symbol;\n _abbrObj = localeData.abbreviations;\n _decimalSep = localeData.delimiters.decimal;\n if (localeData.delimiters.thousands === '.') {\n _thousandSep = '\\\\.';\n } else {\n _thousandSep = localeData.delimiters.thousands;\n }\n\n // validating currency symbol\n temp = val.match(/^[^\\d]+/);\n if (temp !== null) {\n val = val.substr(1);\n if (temp[0] !== _currSymbol) {\n return false;\n }\n }\n\n //validating abbreviation symbol\n temp = val.match(/[^\\d]+$/);\n if (temp !== null) {\n val = val.slice(0, -1);\n if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million && temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) {\n return false;\n }\n }\n\n _thousandRegEx = new RegExp(_thousandSep + '{2}');\n\n if (!val.match(/[^\\d.,]/g)) {\n _valArray = val.split(_decimalSep);\n if (_valArray.length > 2) {\n return false;\n } else {\n if (_valArray.length < 2) {\n return ( !! _valArray[0].match(/^\\d+.*\\d$/) && !_valArray[0].match(_thousandRegEx));\n } else {\n if (_valArray[0].length === 1) {\n return ( !! _valArray[0].match(/^\\d+$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\\d+$/));\n } else {\n return ( !! _valArray[0].match(/^\\d+.*\\d$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\\d+$/));\n }\n }\n }\n }\n\n return false;\n };\n\n\n /************************************\n Numeral Prototype\n ************************************/\n\n numeral.fn = Numeral.prototype = {\n clone: function() {\n return numeral(this);\n },\n format: function(inputString, roundingFunction) {\n var value = this._value,\n format = inputString || options.defaultFormat,\n kind,\n output,\n formatFunction;\n\n // make sure we have a roundingFunction\n roundingFunction = roundingFunction || Math.round;\n\n // format based on value\n if (value === 0 && options.zeroFormat !== null) {\n output = options.zeroFormat;\n } else if (value === null && options.nullFormat !== null) {\n output = options.nullFormat;\n } else {\n for (kind in formats) {\n if (format.match(formats[kind].regexps.format)) {\n formatFunction = formats[kind].format;\n\n break;\n }\n }\n\n formatFunction = formatFunction || numeral._.numberToFormat;\n\n output = formatFunction(value, format, roundingFunction);\n }\n\n return output;\n },\n value: function() {\n return this._value;\n },\n input: function() {\n return this._input;\n },\n set: function(value) {\n this._value = Number(value);\n\n return this;\n },\n add: function(value) {\n var corrFactor = _.correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr, currI, O) {\n return accum + Math.round(corrFactor * curr);\n }\n\n this._value = _.reduce([this._value, value], cback, 0) / corrFactor;\n\n return this;\n },\n subtract: function(value) {\n var corrFactor = _.correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr, currI, O) {\n return accum - Math.round(corrFactor * curr);\n }\n\n this._value = _.reduce([value], cback, Math.round(this._value * corrFactor)) / corrFactor;\n\n return this;\n },\n multiply: function(value) {\n function cback(accum, curr, currI, O) {\n var corrFactor = _.correctionFactor(accum, curr);\n return Math.round(accum * corrFactor) * Math.round(curr * corrFactor) / Math.round(corrFactor * corrFactor);\n }\n\n this._value = _.reduce([this._value, value], cback, 1);\n\n return this;\n },\n divide: function(value) {\n function cback(accum, curr, currI, O) {\n var corrFactor = _.correctionFactor(accum, curr);\n return Math.round(accum * corrFactor) / Math.round(curr * corrFactor);\n }\n\n this._value = _.reduce([this._value, value], cback);\n\n return this;\n },\n difference: function(value) {\n return Math.abs(numeral(this._value).subtract(value).value());\n }\n };\n\n /************************************\n Default Locale && Format\n ************************************/\n\n numeral.register('locale', 'en', {\n delimiters: {\n thousands: ',',\n decimal: '.'\n },\n abbreviations: {\n thousand: 'k',\n million: 'm',\n billion: 'b',\n trillion: 't'\n },\n ordinal: function(number) {\n var b = number % 10;\n return (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n },\n currency: {\n symbol: '$'\n }\n });\n\n \n\n(function() {\n numeral.register('format', 'bps', {\n regexps: {\n format: /(BPS)/,\n unformat: /(BPS)/\n },\n format: function(value, format, roundingFunction) {\n var space = numeral._.includes(format, ' BPS') ? ' ' : '',\n output;\n\n value = value * 10000;\n\n // check for space before BPS\n format = format.replace(/\\s?BPS/, '');\n\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n if (numeral._.includes(output, ')')) {\n output = output.split('');\n\n output.splice(-1, 0, space + 'BPS');\n\n output = output.join('');\n } else {\n output = output + space + 'BPS';\n }\n\n return output;\n },\n unformat: function(string) {\n return +(numeral._.stringToNumber(string) * 0.0001).toFixed(15);\n }\n });\n})();\n\n\n(function() {\n var decimal = {\n base: 1000,\n suffixes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n },\n binary = {\n base: 1024,\n suffixes: ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']\n };\n\n var allSuffixes = decimal.suffixes.concat(binary.suffixes.filter(function (item) {\n return decimal.suffixes.indexOf(item) < 0;\n }));\n var unformatRegex = allSuffixes.join('|');\n // Allow support for BPS (http://www.investopedia.com/terms/b/basispoint.asp)\n unformatRegex = '(' + unformatRegex.replace('B', 'B(?!PS)') + ')';\n\n numeral.register('format', 'bytes', {\n regexps: {\n format: /([0\\s]i?b)/,\n unformat: new RegExp(unformatRegex)\n },\n format: function(value, format, roundingFunction) {\n var output,\n bytes = numeral._.includes(format, 'ib') ? binary : decimal,\n suffix = numeral._.includes(format, ' b') || numeral._.includes(format, ' ib') ? ' ' : '',\n power,\n min,\n max;\n\n // check for space before\n format = format.replace(/\\s?i?b/, '');\n\n for (power = 0; power <= bytes.suffixes.length; power++) {\n min = Math.pow(bytes.base, power);\n max = Math.pow(bytes.base, power + 1);\n\n if (value === null || value === 0 || value >= min && value < max) {\n suffix += bytes.suffixes[power];\n\n if (min > 0) {\n value = value / min;\n }\n\n break;\n }\n }\n\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n return output + suffix;\n },\n unformat: function(string) {\n var value = numeral._.stringToNumber(string),\n power,\n bytesMultiplier;\n\n if (value) {\n for (power = decimal.suffixes.length - 1; power >= 0; power--) {\n if (numeral._.includes(string, decimal.suffixes[power])) {\n bytesMultiplier = Math.pow(decimal.base, power);\n\n break;\n }\n\n if (numeral._.includes(string, binary.suffixes[power])) {\n bytesMultiplier = Math.pow(binary.base, power);\n\n break;\n }\n }\n\n value *= (bytesMultiplier || 1);\n }\n\n return value;\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'currency', {\n regexps: {\n format: /(\\$)/\n },\n format: function(value, format, roundingFunction) {\n var locale = numeral.locales[numeral.options.currentLocale],\n symbols = {\n before: format.match(/^([\\+|\\-|\\(|\\s|\\$]*)/)[0],\n after: format.match(/([\\+|\\-|\\)|\\s|\\$]*)$/)[0]\n },\n output,\n symbol,\n i;\n\n // strip format of spaces and $\n format = format.replace(/\\s?\\$\\s?/, '');\n\n // format the number\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n // update the before and after based on value\n if (value >= 0) {\n symbols.before = symbols.before.replace(/[\\-\\(]/, '');\n symbols.after = symbols.after.replace(/[\\-\\)]/, '');\n } else if (value < 0 && (!numeral._.includes(symbols.before, '-') && !numeral._.includes(symbols.before, '('))) {\n symbols.before = '-' + symbols.before;\n }\n\n // loop through each before symbol\n for (i = 0; i < symbols.before.length; i++) {\n symbol = symbols.before[i];\n\n switch (symbol) {\n case '$':\n output = numeral._.insert(output, locale.currency.symbol, i);\n break;\n case ' ':\n output = numeral._.insert(output, ' ', i + locale.currency.symbol.length - 1);\n break;\n }\n }\n\n // loop through each after symbol\n for (i = symbols.after.length - 1; i >= 0; i--) {\n symbol = symbols.after[i];\n\n switch (symbol) {\n case '$':\n output = i === symbols.after.length - 1 ? output + locale.currency.symbol : numeral._.insert(output, locale.currency.symbol, -(symbols.after.length - (1 + i)));\n break;\n case ' ':\n output = i === symbols.after.length - 1 ? output + ' ' : numeral._.insert(output, ' ', -(symbols.after.length - (1 + i) + locale.currency.symbol.length - 1));\n break;\n }\n }\n\n\n return output;\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'exponential', {\n regexps: {\n format: /(e\\+|e-)/,\n unformat: /(e\\+|e-)/\n },\n format: function(value, format, roundingFunction) {\n var output,\n exponential = typeof value === 'number' && !numeral._.isNaN(value) ? value.toExponential() : '0e+0',\n parts = exponential.split('e');\n\n format = format.replace(/e[\\+|\\-]{1}0/, '');\n\n output = numeral._.numberToFormat(Number(parts[0]), format, roundingFunction);\n\n return output + 'e' + parts[1];\n },\n unformat: function(string) {\n var parts = numeral._.includes(string, 'e+') ? string.split('e+') : string.split('e-'),\n value = Number(parts[0]),\n power = Number(parts[1]);\n\n power = numeral._.includes(string, 'e-') ? power *= -1 : power;\n\n function cback(accum, curr, currI, O) {\n var corrFactor = numeral._.correctionFactor(accum, curr),\n num = (accum * corrFactor) * (curr * corrFactor) / (corrFactor * corrFactor);\n return num;\n }\n\n return numeral._.reduce([value, Math.pow(10, power)], cback, 1);\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'ordinal', {\n regexps: {\n format: /(o)/\n },\n format: function(value, format, roundingFunction) {\n var locale = numeral.locales[numeral.options.currentLocale],\n output,\n ordinal = numeral._.includes(format, ' o') ? ' ' : '';\n\n // check for space before\n format = format.replace(/\\s?o/, '');\n\n ordinal += locale.ordinal(value);\n\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n return output + ordinal;\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'percentage', {\n regexps: {\n format: /(%)/,\n unformat: /(%)/\n },\n format: function(value, format, roundingFunction) {\n var space = numeral._.includes(format, ' %') ? ' ' : '',\n output;\n\n if (numeral.options.scalePercentBy100) {\n value = value * 100;\n }\n\n // check for space before %\n format = format.replace(/\\s?\\%/, '');\n\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n if (numeral._.includes(output, ')')) {\n output = output.split('');\n\n output.splice(-1, 0, space + '%');\n\n output = output.join('');\n } else {\n output = output + space + '%';\n }\n\n return output;\n },\n unformat: function(string) {\n var number = numeral._.stringToNumber(string);\n if (numeral.options.scalePercentBy100) {\n return number * 0.01;\n }\n return number;\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'time', {\n regexps: {\n format: /(:)/,\n unformat: /(:)/\n },\n format: function(value, format, roundingFunction) {\n var hours = Math.floor(value / 60 / 60),\n minutes = Math.floor((value - (hours * 60 * 60)) / 60),\n seconds = Math.round(value - (hours * 60 * 60) - (minutes * 60));\n\n return hours + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);\n },\n unformat: function(string) {\n var timeArray = string.split(':'),\n seconds = 0;\n\n // turn hours and minutes into seconds and add them all up\n if (timeArray.length === 3) {\n // hours\n seconds = seconds + (Number(timeArray[0]) * 60 * 60);\n // minutes\n seconds = seconds + (Number(timeArray[1]) * 60);\n // seconds\n seconds = seconds + Number(timeArray[2]);\n } else if (timeArray.length === 2) {\n // minutes\n seconds = seconds + (Number(timeArray[0]) * 60);\n // seconds\n seconds = seconds + Number(timeArray[1]);\n }\n return Number(seconds);\n }\n });\n})();\n\nreturn numeral;\n}));\n","import React from 'react';\nimport numeral from 'numeral';\nimport CircleSpinner, { CircleLoadingState } from '../Loading/CircleSpinner';\nimport { Icons } from '../../types';\nimport { ICONS_TO_SOURCE } from '../../constants/icons';\n\nexport type CircleIconProps = {\n iconSrc?: string;\n count?: string | number;\n onClick?: () => void;\n bgColor?: string;\n innerPadding?: string;\n size?: string;\n borderColor?: string;\n loading?: boolean;\n};\n\nexport type CountCircleProps = {\n size?: string;\n count?: string | number;\n innerPadding?: string;\n onClick?: () => {};\n bgColor?: string;\n className?: string;\n loading?: boolean;\n};\n\nexport const CountCircle: React.FC<CountCircleProps> = ({\n size = 'auto',\n count = '28',\n innerPadding = '3px 5px',\n className,\n onClick = () => {},\n bgColor = 'bg-grayscale-50',\n loading,\n}) => {\n const _count = count >= 1000 ? numeral(count).format('0.0a') : count;\n const circleLoadingState = loading ? CircleLoadingState.spin : CircleLoadingState.stop;\n const style = {\n width: size,\n height: size,\n padding: !loading ? innerPadding : '0px',\n };\n\n const spinnerStyle = {\n transform: 'translateX(-2px) translateY(1px)',\n };\n\n return (\n <section\n onClick={onClick}\n className={`${bgColor} rounded-full circle-icon-wrapper text-center absolute right-[-18px] top-[-18px] min-w-[25px] ${className}`}\n style={style}\n >\n <div className={`h-full`}>\n {!loading && count && (\n <p className=\"h-full line-clamp-1 font-semibold text-grayscale-900 text-[12px]\">\n {_count}\n </p>\n )}\n {loading && (\n <div style={spinnerStyle}>\n <CircleSpinner loadingState={circleLoadingState} thickness={3} size={20} />\n </div>\n )}\n </div>\n </section>\n );\n};\n\nexport const CircleIcon: React.FC<CircleIconProps> = ({\n iconSrc = ICONS_TO_SOURCE[Icons.coinsIcon],\n size = '52px',\n count = '28',\n innerPadding = '6px',\n onClick = () => {},\n bgColor = 'bg-grayscale-900',\n loading,\n}) => {\n const style = {\n width: size,\n height: size,\n padding: innerPadding,\n };\n\n return (\n <section\n onClick={onClick}\n className={`${bgColor} rounded-full circle-icon-wrapper p-[0px] m-[0px]`}\n style={style}\n >\n <div className={`relative w-full h-full`}>\n <CountCircle count={count} loading={loading} />\n <img className=\"h-full w-full object-cover\" src={iconSrc ?? ''} alt=\"Icon image\" />\n </div>\n </section>\n );\n};\n\nexport default CircleIcon;\n"],"names":["this","CircleLoadingState","React","CircleSpinner","ICONS_TO_SOURCE","Icons"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAQA,CAAA,CAAC,UAAU,MAAM,EAAE,OAAO,EAAE;KAGjB,IAAkC,MAAM,CAAC,OAAO,EAAE;SACrD,MAAA,CAAA,OAAA,GAAiB,OAAO,EAAE,CAAC;AACnC,MAAK,MAAM;AACX,SAAQ,MAAM,CAAC,OAAO,GAAG,OAAO,EAAE,CAAC;MAC9B;EACJ,CAACA,cAAI,EAAE,YAAY;AACpB;AACA;AACA;AACA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,IAAI,OAAO;AACX,IAAI,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,iDAAiD,CAAC;AAC5E,IAAI,KAAK;AACT,GAAG,kBAAkBA,yBAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AAChD,IAAI,SAAS,EAAE,CAAC,sBAAsB,CAAC;AACvC,GAAG,kBAAkBA,yBAAK,CAAC,aAAa,CAAC,WAAW,EAAE;AACtD,IAAI,KAAK;AACT,IAAI,OAAO;AACX,GAAG,CAAC,kBAAkBA,yBAAK,CAAC,aAAa,CAAC,KAAK,EAAE;AACjD,IAAI,SAAS,EAAE,4BAA4B;AAC3C,IAAI,GAAG,EAAE,OAAO,IAAI,IAAI,GAAG,OAAO,GAAG,EAAE;AACvC,IAAI,GAAG,EAAE,YAAY;AACrB,GAAG,CAAC,CAAC,CAAC,CAAC;AACP;;;;;"}
|
|
@@ -9,43 +9,65 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
9
9
|
|
|
10
10
|
const Lightbox = ({ items, currentUrl, setCurrentUrl }) => {
|
|
11
11
|
const currentItem = items.find((item) => item.url === currentUrl);
|
|
12
|
-
React.useCallback(() => {
|
|
12
|
+
const goToNextItem = React.useCallback(() => {
|
|
13
13
|
const currentIndex = items.findIndex((item) => item.url === currentUrl);
|
|
14
14
|
const nextItem = items.at((currentIndex + 1) % items.length);
|
|
15
15
|
if (nextItem) {
|
|
16
16
|
setCurrentUrl(nextItem.url);
|
|
17
17
|
}
|
|
18
18
|
}, [currentUrl]);
|
|
19
|
-
React.useCallback(() => {
|
|
19
|
+
const goToPreviousItem = React.useCallback(() => {
|
|
20
20
|
const currentIndex = items.findIndex((item) => item.url === currentUrl);
|
|
21
21
|
const previousItem = items.at((currentIndex - 1) % items.length);
|
|
22
22
|
if (previousItem) {
|
|
23
23
|
setCurrentUrl(previousItem.url);
|
|
24
24
|
}
|
|
25
25
|
}, [currentUrl]);
|
|
26
|
+
const innerRef = React.useRef(null);
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
const keydownListener = (e) => {
|
|
29
|
+
if (!currentUrl || !currentItem) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (e.key === "Escape") {
|
|
33
|
+
e.preventDefault();
|
|
34
|
+
e.stopPropagation();
|
|
35
|
+
setCurrentUrl(void 0);
|
|
36
|
+
}
|
|
37
|
+
if (e.key === "ArrowRight") {
|
|
38
|
+
e.preventDefault();
|
|
39
|
+
e.stopPropagation();
|
|
40
|
+
goToNextItem();
|
|
41
|
+
}
|
|
42
|
+
if (e.key === "ArrowLeft") {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
e.stopPropagation();
|
|
45
|
+
goToPreviousItem();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
window.addEventListener("keydown", keydownListener);
|
|
49
|
+
return () => {
|
|
50
|
+
window.removeEventListener("keydown", keydownListener);
|
|
51
|
+
};
|
|
52
|
+
}, [currentUrl, currentItem]);
|
|
26
53
|
if (!currentUrl || !currentItem) {
|
|
27
54
|
return null;
|
|
28
55
|
}
|
|
29
|
-
const innerRef = React.createRef();
|
|
30
56
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, reactDom.createPortal(/* @__PURE__ */ React__default["default"].createElement("div", {
|
|
31
57
|
className: "absolute top-0 left-0 w-screen h-screen bg-[rgba(0,0,0,0.9)] text-white flex justify-center items-center z-[999999]",
|
|
32
58
|
onClick: (e) => {
|
|
33
59
|
if (e.target !== innerRef.current) {
|
|
34
60
|
setCurrentUrl(void 0);
|
|
35
61
|
}
|
|
36
|
-
},
|
|
37
|
-
tabIndex: -1,
|
|
38
|
-
onKeyDown: (e) => {
|
|
39
|
-
return;
|
|
40
62
|
}
|
|
41
63
|
}, currentItem.type === "photo" && /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
42
|
-
className: "cursor-pointer",
|
|
64
|
+
className: "cursor-pointer max-w-[90vw] max-h-[90vh]",
|
|
43
65
|
src: currentUrl,
|
|
44
66
|
onClick: () => {
|
|
45
67
|
window.open(currentUrl, "_blank");
|
|
46
68
|
},
|
|
47
69
|
ref: innerRef
|
|
48
|
-
}), currentItem.type === "video" && currentUrl.
|
|
70
|
+
}), currentItem.type === "video" && new URL(currentUrl).hostname.replace("www.", "").startsWith("youtube.com") && /* @__PURE__ */ React__default["default"].createElement("iframe", {
|
|
49
71
|
width: "560",
|
|
50
72
|
height: "315",
|
|
51
73
|
src: currentUrl.replace("watch?v=", "embed/")
|
|
@@ -53,4 +75,4 @@ const Lightbox = ({ items, currentUrl, setCurrentUrl }) => {
|
|
|
53
75
|
};
|
|
54
76
|
|
|
55
77
|
exports.Lightbox = Lightbox;
|
|
56
|
-
//# sourceMappingURL=Lightbox-
|
|
78
|
+
//# sourceMappingURL=Lightbox-f19e13d2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lightbox-f19e13d2.js","sources":["../../src/components/Lightbox/Lightbox.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from 'react';\nimport { createPortal } from 'react-dom';\n\nexport type LightboxItemType = 'photo' | 'video';\n\nexport type LightboxItem = {\n url: string;\n type: LightboxItemType;\n};\n\nexport type LightboxImage = LightboxItem & {\n type: 'photo';\n alt?: string;\n};\n\nexport type LightboxVideo = LightboxItem & {\n type: 'video';\n};\n\nexport type LightboxProps = {\n items: LightboxItem[];\n currentUrl: string | undefined;\n setCurrentUrl: (url: string | undefined) => void;\n};\n\nexport const Lightbox: React.FC<LightboxProps> = ({ items, currentUrl, setCurrentUrl }) => {\n const currentItem = items.find(item => item.url === currentUrl);\n const goToNextItem = useCallback(() => {\n const currentIndex = items.findIndex(item => item.url === currentUrl);\n const nextItem = items.at((currentIndex + 1) % items.length);\n\n if (nextItem) {\n setCurrentUrl(nextItem.url);\n }\n }, [currentUrl]);\n const goToPreviousItem = useCallback(() => {\n const currentIndex = items.findIndex(item => item.url === currentUrl);\n const previousItem = items.at((currentIndex - 1) % items.length);\n\n if (previousItem) {\n setCurrentUrl(previousItem.url);\n }\n }, [currentUrl]);\n\n const innerRef = useRef<HTMLImageElement>(null);\n\n useEffect(() => {\n const keydownListener: (this: Window, e: KeyboardEvent) => any = e => {\n if (!currentUrl || !currentItem) {\n return;\n }\n\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n\n setCurrentUrl(undefined);\n }\n\n if (e.key === 'ArrowRight') {\n e.preventDefault();\n e.stopPropagation();\n\n goToNextItem();\n }\n\n if (e.key === 'ArrowLeft') {\n e.preventDefault();\n e.stopPropagation();\n\n goToPreviousItem();\n }\n };\n\n window.addEventListener('keydown', keydownListener);\n\n return () => {\n window.removeEventListener('keydown', keydownListener);\n };\n }, [currentUrl, currentItem]);\n\n if (!currentUrl || !currentItem) {\n return null;\n }\n\n return (\n <>\n {createPortal(\n <div\n className=\"absolute top-0 left-0 w-screen h-screen bg-[rgba(0,0,0,0.9)] text-white flex justify-center items-center z-[999999]\"\n onClick={e => {\n if (e.target !== innerRef.current) {\n setCurrentUrl(undefined);\n }\n }}\n >\n {currentItem.type === 'photo' && (\n <img\n className=\"cursor-pointer max-w-[90vw] max-h-[90vh]\"\n src={currentUrl}\n onClick={() => {\n window.open(currentUrl, '_blank');\n }}\n ref={innerRef}\n />\n )}\n {currentItem.type === 'video' &&\n new URL(currentUrl).hostname\n .replace('www.', '')\n .startsWith('youtube.com') && (\n <iframe\n width=\"560\"\n height=\"315\"\n src={currentUrl.replace('watch?v=', 'embed/')}\n />\n )}\n </div>,\n document.body\n )}\n </>\n );\n};\n"],"names":["useCallback","useRef","useEffect","React","createPortal"],"mappings":";;;;;;;;;AAEY,MAAC,QAAQ,GAAG,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK;AAClE,EAAE,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC;AACpE,EAAE,MAAM,YAAY,GAAG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C;AACzD,IAAI,GAAG,EAAE,UAAU;AACnB,IAAI,OAAO,EAAE,MAAM;AACnB,MAAM,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACxC,KAAK;AACL,IAAI,GAAG,EAAE,QAAQ;AACjB,GAAG,CAAC,EAAE,WAAW,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,oBAAoBA,yBAAK,CAAC,aAAa,CAAC,QAAQ,EAAE;AAClK,IAAI,KAAK,EAAE,KAAK;AAChB,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,GAAG,EAAE,UAAU,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC;AACjD,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;AACvB;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var init = require('@learncard/init');
|
|
5
5
|
var VCDisplayCard = require('./VCDisplayCard-05393c28.js');
|
|
6
|
-
var VCDisplayCard2 = require('./VCDisplayCard2-
|
|
6
|
+
var VCDisplayCard2 = require('./VCDisplayCard2-74b0ebb3.js');
|
|
7
7
|
require('./default-face.jpeg');
|
|
8
8
|
require('react-dom');
|
|
9
9
|
require('./types.esm-8d2141ba.js');
|
|
@@ -79,4 +79,4 @@ const VCCard = ({
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
exports.VCCard = VCCard;
|
|
82
|
-
//# sourceMappingURL=VCCard-
|
|
82
|
+
//# sourceMappingURL=VCCard-2459aa7b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VCCard-
|
|
1
|
+
{"version":3,"file":"VCCard-2459aa7b.js","sources":["../../src/components/VCCard/VCCard.tsx"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { initLearnCard } from '@learncard/init';\nimport { VC, Profile, VerificationItem } from '@learncard/types';\n\nimport { VCDisplayCard } from '../VCDisplayCard';\nimport {\n VCDisplayCard2,\n MediaMetadata,\n VideoMetadata,\n CredentialIconType,\n} from '../VCDisplayCard2';\n\nexport type VCCardProps = {\n credential: VC;\n issueeOverride?: Profile;\n className?: string;\n version?: '1' | '2';\n\n /* Only used for version 2 */\n subjectImageComponent?: React.ReactNode;\n // convertTagsToSkills?: (tags: string[]) => { [skill: string]: string[] };\n handleXClick?: () => void;\n getFileMetadata?: (url: string) => MediaMetadata;\n getVideoMetadata?: (url: string) => VideoMetadata;\n onMediaAttachmentClick?: (url: string) => void;\n bottomRightIcon?: CredentialIconType;\n};\n\nexport const VCCard: React.FC<VCCardProps> = ({\n credential,\n issueeOverride,\n className = '',\n version = '1',\n subjectImageComponent,\n // convertTagsToSkills,\n handleXClick,\n getFileMetadata,\n getVideoMetadata,\n onMediaAttachmentClick,\n bottomRightIcon,\n}) => {\n const [loading, setLoading] = useState(true);\n const [vcVerification, setVCVerification] = useState<VerificationItem[]>([]);\n\n useEffect(() => {\n const verify = async () => {\n const wallet = await initLearnCard();\n const verification = await wallet.invoke.verifyCredential(credential, {}, true);\n setVCVerification(verification);\n setLoading(false);\n };\n\n verify();\n }, [credential]);\n\n if (version === '1') {\n return (\n <VCDisplayCard\n credential={credential}\n issueeOverride={issueeOverride}\n className={className}\n loading={loading}\n verification={vcVerification}\n />\n );\n }\n return (\n <VCDisplayCard2\n credential={credential}\n issueeOverride={issueeOverride}\n verificationInProgress={loading}\n verificationItems={vcVerification}\n subjectImageComponent={subjectImageComponent}\n // convertTagsToSkills={convertTagsToSkills}\n handleXClick={handleXClick}\n getFileMetadata={getFileMetadata}\n getVideoMetadata={getVideoMetadata}\n onMediaAttachmentClick={onMediaAttachmentClick}\n bottomRightIcon={bottomRightIcon}\n />\n );\n};\n\nexport default VCCard;\n"],"names":["useState","useEffect","this","initLearnCard","React","VCDis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AACnB,GAAG,CAAC,CAAC;AACL;;;;"}
|
|
@@ -4,7 +4,7 @@ var React = require('react');
|
|
|
4
4
|
var VCVerificationCheck = require('./VCVerificationCheck-46fa75d3.js');
|
|
5
5
|
var DefaultFace = require('./default-face.jpeg');
|
|
6
6
|
var credential_helpers = require('./credential.helpers-a4559d6b.js');
|
|
7
|
-
var Lightbox = require('./Lightbox-
|
|
7
|
+
var Lightbox = require('./Lightbox-f19e13d2.js');
|
|
8
8
|
var types_esm = require('./types.esm-8d2141ba.js');
|
|
9
9
|
var AwardRibbon = require('./AwardRibbon-14ba45fb.js');
|
|
10
10
|
var index = require('./index-d836b84d.js');
|
|
@@ -554,12 +554,18 @@ const MediaAttachmentsBox = ({
|
|
|
554
554
|
className: "shrink-0"
|
|
555
555
|
}), /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
556
556
|
className: "text-grayscale-900 font-[400]"
|
|
557
|
-
}, (_a = docOrLink.title) != null ? _a : "No title")), docOrLink.type === "document" && metadata && /* @__PURE__ */ React__default["default"].createElement("
|
|
558
|
-
|
|
557
|
+
}, (_a = docOrLink.title) != null ? _a : "No title")), docOrLink.type === "document" && metadata && /* @__PURE__ */ React__default["default"].createElement("a", {
|
|
558
|
+
href: docOrLink.url,
|
|
559
|
+
target: "_blank",
|
|
560
|
+
rel: "noreferrer",
|
|
561
|
+
className: "text-grayscale-600 font-[600] px-[5px] hover:underline"
|
|
559
562
|
}, fileExtension && /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
560
563
|
className: "uppercase"
|
|
561
|
-
}, fileExtension), fileExtension && (numberOfPages || sizeInBytes) && " \u2022 ", numberOfPages && /* @__PURE__ */ React__default["default"].createElement("span", null, numberOfPages, " page", numberOfPages === 1 ? "" : "s"), numberOfPages && sizeInBytes && " \u2022 ", sizeInBytes && /* @__PURE__ */ React__default["default"].createElement("span", null, prettyBytes(sizeInBytes))), docOrLink.type === "link" && /* @__PURE__ */ React__default["default"].createElement("
|
|
562
|
-
|
|
564
|
+
}, fileExtension), fileExtension && (numberOfPages || sizeInBytes) && " \u2022 ", numberOfPages && /* @__PURE__ */ React__default["default"].createElement("span", null, numberOfPages, " page", numberOfPages === 1 ? "" : "s"), numberOfPages && sizeInBytes && " \u2022 ", sizeInBytes && /* @__PURE__ */ React__default["default"].createElement("span", null, prettyBytes(sizeInBytes))), docOrLink.type === "link" && /* @__PURE__ */ React__default["default"].createElement("a", {
|
|
565
|
+
href: docOrLink.url,
|
|
566
|
+
target: "_blank",
|
|
567
|
+
rel: "noreferrer",
|
|
568
|
+
className: "text-indigo-500 font-[600] px-[5px] hover:underline"
|
|
563
569
|
}, baseUrl));
|
|
564
570
|
const className = `row-attachment ${docOrLink.type} bg-grayscale-100 rounded-[15px] p-[10px] w-full font-poppins text-[12px] leading-[18px] tracking-[-0.33px] text-left`;
|
|
565
571
|
if (onMediaAttachmentClick) {
|
|
@@ -1017,4 +1023,4 @@ const VCDisplayCard2 = ({
|
|
|
1017
1023
|
};
|
|
1018
1024
|
|
|
1019
1025
|
exports.VCDisplayCard2 = VCDisplayCard2;
|
|
1020
|
-
//# sourceMappingURL=VCDisplayCard2-
|
|
1026
|
+
//# sourceMappingURL=VCDisplayCard2-74b0ebb3.js.map
|