Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
59 lines
2.5 KiB
TypeScript
59 lines
2.5 KiB
TypeScript
// Module ID: 12721
|
|
// Function ID: 12722
|
|
// Name: ProgressCircle
|
|
// Dependencies: [19, 17, 21, 4636, 4347, 576, 8574, 2]
|
|
|
|
// Module 12721 (ProgressCircle)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import inlineStyles from "inlineStyles" /* 8574 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
const inlineStylesDefault = inlineStyles;
|
|
|
|
require = fn;
|
|
const View = fn(17).View;
|
|
const jsxProd = fn(21);
|
|
({ jsx: closure_4, jsxs: hasOwnProperty } = jsxProd);
|
|
const createStyles = fn(4636);
|
|
let closure_6 = createStyles.createLegacyClassComponentStyles({ progressCircle: { alignItems: "center", justifyContent: "center" }, circle: { position: "absolute", width: "100%", height: "100%" }, circleOverlay: { position: "relative", display: "flex", justifyContent: "center", alignItems: "center" } });
|
|
const Component = noop.Component;
|
|
class ProgressCircle extends Component {
|
|
}
|
|
const prototype = ProgressCircle.prototype;
|
|
prototype["renderCircle"] = function renderCircle() {
|
|
const props = this.props;
|
|
({ size, strokeWidth } = props);
|
|
const result = (size - strokeWidth) / 2;
|
|
const result1 = result * Math.PI * 2;
|
|
const bound = Math.min(Math.max(props.percent, 0), 100);
|
|
const obj = { viewBox: null, style: null, children: null };
|
|
const tmp = closure_6(this.context);
|
|
obj.viewBox = "0 0 " + size + " " + size;
|
|
obj.style = tmp.circle;
|
|
const obj2 = { fill: "none", cx: size / 2, cy: size / 2, r: result, strokeWidth, strokeLinecap: "round", transform: "rotate(-90 " + size / 2 + " " + size / 2 + ")", stroke: props.color, style: { strokeDasharray: result1, strokeDashoffset: (1 - bound / 100) * result1 } };
|
|
obj.children = React4(inlineStyles.Circle, obj2);
|
|
return React4(inlineStylesDefault, obj);
|
|
};
|
|
prototype["render"] = function render() {
|
|
const tmp = closure_6(this.context);
|
|
const props = this.props;
|
|
const children = props.children;
|
|
const obj = { style: null, children: null };
|
|
const items = [tmp.progressCircle, props.style];
|
|
obj.style = items;
|
|
const items1 = [this.renderCircle(), ];
|
|
let tmp4 = null;
|
|
if (null != children) {
|
|
const obj2 = { style: tmp.circleOverlay, children };
|
|
tmp4 = React4(tmp3, obj2);
|
|
}
|
|
items1[1] = tmp4;
|
|
obj.children = items1;
|
|
return hasOwnProperty(View, obj);
|
|
};
|
|
ProgressCircle.contextType = fn(4347).ThemeContext;
|
|
ProgressCircle.defaultProps = { size: 20, strokeWidth: 0.9, color: nativeDefault.unsafe_rawColors.GUILD_BOOSTING_PINK };
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/premium/native/components/ProgressCircle.tsx");
|
|
|
|
export default ProgressCircle;
|