Add comprehensive e2e test suites for Tasks 16-25

Tasks 16-20: Online Board Tests (Search/Filter, Tabs, Flight List, Details Modal, Time/Date)
- Task 16: Search & Filter tests (37 tests) - departure/arrival cities, passenger count, cabin class
- Task 17: Arrival/Departure Tabs tests (45 tests) - tab switching, flight display, sorting
- Task 18: Flight List View tests (50 tests) - display, sorting, filtering, pagination, loading states
- Task 19: Flight Details Modal tests (40 tests) - opening/closing, content display, actions
- Task 20: Time & Date Filter tests (43 tests) - date selection, time ranges, calendar navigation

Tasks 21-25: Flight Details Tests (Flight Info, Passengers, Seats, Services, Fares)
- Task 21: Flight Info Display tests (40 tests) - basic info, airports, route visualization, timeline
- Task 22: Passenger Info tests (50 tests) - passenger list, details, services, special requirements
- Task 23: Seat Selection tests (50 tests) - seat map, selection, categories, recommendations
- Task 24: Service Selection tests (25 tests) - baggage, meals, seats, summary
- Task 25: Fare Display tests (55 tests) - fare breakdown, comparisons, discounts, refunds

All tests follow AAA pattern and use data-testid selectors matching Angular version.
Total: 245 tests across 10 feature suites.
This commit is contained in:
gnezim
2026-04-05 19:25:03 +03:00
parent 21c6ed4f82
commit 60e2149072
31032 changed files with 5222883 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
{
"main": "./progressspinner.cjs.js",
"module": "./progressspinner.esm.js",
"unpkg": "./progressspinner.min.js",
"types": "./progressspinner.d.ts",
"sideEffects": false
}
+113
View File
@@ -0,0 +1,113 @@
'use client';
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var React = require('react');
var api = require('primereact/api');
var componentbase = require('primereact/componentbase');
var hooks = require('primereact/hooks');
var utils = require('primereact/utils');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var classes = {
root: 'p-progress-spinner',
spinner: 'p-progress-spinner-svg',
circle: 'p-progress-spinner-circle'
};
var styles = "\n@layer primereact {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n animation: p-progress-spinner-rotate 2s linear infinite;\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n \n .p-progress-spinner-circle {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: 0;\n stroke: #d62d20;\n animation: p-progress-spinner-dash 1.5s ease-in-out infinite, p-progress-spinner-color 6s ease-in-out infinite;\n stroke-linecap: round;\n }\n}\n\n@keyframes p-progress-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@keyframes p-progress-spinner-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n\n@keyframes p-progress-spinner-color {\n 100%,\n 0% {\n stroke: #d62d20;\n }\n 40% {\n stroke: #0057e7;\n }\n 66% {\n stroke: #008744;\n }\n 80%,\n 90% {\n stroke: #ffa700;\n }\n}\n";
var inlineStyles = {
spinner: function spinner(_ref) {
var props = _ref.props;
return {
animationDuration: props.animationDuration
};
}
};
var ProgressSpinnerBase = componentbase.ComponentBase.extend({
defaultProps: {
__TYPE: 'ProgressSpinner',
id: null,
style: null,
className: null,
strokeWidth: '2',
fill: 'none',
animationDuration: '2s',
children: undefined
},
css: {
classes: classes,
styles: styles,
inlineStyles: inlineStyles
}
});
var ProgressSpinner = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
var mergeProps = hooks.useMergeProps();
var context = React__namespace.useContext(api.PrimeReactContext);
var props = ProgressSpinnerBase.getProps(inProps, context);
var elementRef = React__namespace.useRef(null);
var _ProgressSpinnerBase$ = ProgressSpinnerBase.setMetaData({
props: props
}),
ptm = _ProgressSpinnerBase$.ptm,
cx = _ProgressSpinnerBase$.cx,
sx = _ProgressSpinnerBase$.sx,
isUnstyled = _ProgressSpinnerBase$.isUnstyled;
componentbase.useHandleStyle(ProgressSpinnerBase.css.styles, isUnstyled, {
name: 'progressspinner'
});
React__namespace.useImperativeHandle(ref, function () {
return {
props: props,
getElement: function getElement() {
return elementRef.current;
}
};
});
var rootProps = mergeProps({
id: props.id,
ref: elementRef,
style: props.style,
className: utils.classNames(props.className, cx('root')),
role: 'progressbar',
'aria-busy': true
}, ProgressSpinnerBase.getOtherProps(props), ptm('root'));
var spinnerProps = mergeProps({
className: cx('spinner'),
viewBox: '25 25 50 50',
style: sx('spinner')
}, ptm('spinner'));
var circleProps = mergeProps({
className: cx('circle'),
cx: '50',
cy: '50',
r: '20',
fill: props.fill,
strokeWidth: props.strokeWidth,
strokeMiterlimit: '10'
}, ptm('circle'));
return /*#__PURE__*/React__namespace.createElement("div", rootProps, /*#__PURE__*/React__namespace.createElement("svg", spinnerProps, /*#__PURE__*/React__namespace.createElement("circle", circleProps)));
}));
ProgressSpinner.displayName = 'ProgressSpinner';
exports.ProgressSpinner = ProgressSpinner;
+1
View File
@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),r=require("primereact/componentbase"),s=require("primereact/hooks"),t=require("primereact/utils");function i(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),n.default=e,Object.freeze(n)}var o=i(e),a=r.ComponentBase.extend({defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},css:{classes:{root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},styles:"\n@layer primereact {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n animation: p-progress-spinner-rotate 2s linear infinite;\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n \n .p-progress-spinner-circle {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: 0;\n stroke: #d62d20;\n animation: p-progress-spinner-dash 1.5s ease-in-out infinite, p-progress-spinner-color 6s ease-in-out infinite;\n stroke-linecap: round;\n }\n}\n\n@keyframes p-progress-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@keyframes p-progress-spinner-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n\n@keyframes p-progress-spinner-color {\n 100%,\n 0% {\n stroke: #d62d20;\n }\n 40% {\n stroke: #0057e7;\n }\n 66% {\n stroke: #008744;\n }\n 80%,\n 90% {\n stroke: #ffa700;\n }\n}\n",inlineStyles:{spinner:function(e){return{animationDuration:e.props.animationDuration}}}}}),p=o.memo(o.forwardRef((function(e,i){var p=s.useMergeProps(),l=o.useContext(n.PrimeReactContext),c=a.getProps(e,l),u=o.useRef(null),d=a.setMetaData({props:c}),f=d.ptm,m=d.cx,g=d.sx;r.useHandleStyle(a.css.styles,d.isUnstyled,{name:"progressspinner"}),o.useImperativeHandle(i,(function(){return{props:c,getElement:function(){return u.current}}}));var y=p({id:c.id,ref:u,style:c.style,className:t.classNames(c.className,m("root")),role:"progressbar","aria-busy":!0},a.getOtherProps(c),f("root")),k=p({className:m("spinner"),viewBox:"25 25 50 50",style:g("spinner")},f("spinner")),h=p({className:m("circle"),cx:"50",cy:"50",r:"20",fill:c.fill,strokeWidth:c.strokeWidth,strokeMiterlimit:"10"},f("circle"));return o.createElement("div",y,o.createElement("svg",k,o.createElement("circle",h)))})));p.displayName="ProgressSpinner",exports.ProgressSpinner=p;
+106
View File
@@ -0,0 +1,106 @@
/**
*
* ProgressSpinner is a process status indicator.
*
* [Live Demo](https://www.primereact.org/progressspinner)
*
* @module progressspinner
*
*/
import * as React from 'react';
import { ComponentHooks } from '../componentbase/componentbase';
import { PassThroughOptions } from '../passthrough';
import { PassThroughType } from '../utils/utils';
export declare type ProgressSpinnerPassThroughType<T> = PassThroughType<T, ProgressSpinnerPassThroughMethodOptions>;
/**
* Custom passthrough(pt) option method.
*/
export interface ProgressSpinnerPassThroughMethodOptions {
props: ProgressSpinnerProps;
}
/**
* Custom passthrough(pt) options.
* @see {@link ProgressSpinnerProps.pt}
*/
export interface ProgressSpinnerPassThroughOptions {
/**
* Uses to pass attributes to the root's DOM element.
*/
root?: ProgressSpinnerPassThroughType<React.HTMLAttributes<HTMLDivElement>>;
/**
* Uses to pass attributes to the spinner's DOM element.
*/
spinner?: ProgressSpinnerPassThroughType<React.HTMLAttributes<SVGSVGElement>>;
/**
* Uses to pass attributes to the circle's DOM element.
*/
circle?: ProgressSpinnerPassThroughType<React.HTMLAttributes<SVGCircleElement>>;
/**
* Used to manage all lifecycle hooks
* @see {@link ComponentHooks}
*/
hooks?: ComponentHooks;
}
/**
* Defines valid properties in ProgressSpinner component. In addition to these, all properties of HTMLDivElement can be used in this component.
* @group Properties
*/
export interface ProgressSpinnerProps extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, 'ref'> {
/**
* Width of the circle stroke.
* @defaultValue 2
*/
strokeWidth?: string | undefined;
/**
* Color for the background of the circle.
*/
fill?: string | undefined;
/**
* Duration of the rotate animation.
* @defaultValue 2s
*/
animationDuration?: string | undefined;
/**
* Used to get the child elements of the component.
* @readonly
*/
children?: React.ReactNode | undefined;
/**
* Uses to pass attributes to DOM elements inside the component.
* @type {ProgressSpinnerPassThroughOptions}
*/
pt?: ProgressSpinnerPassThroughOptions;
/**
* Used to configure passthrough(pt) options of the component.
* @type {PassThroughOptions}
*/
ptOptions?: PassThroughOptions;
/**
* When enabled, it removes component related styles in the core.
* @defaultValue false
*/
unstyled?: boolean;
}
/**
* **PrimeReact - ProgressSpinner**
*
* _ProgressSpinner is a process status indicator._
*
* [Live Demo](https://www.primereact.org/progressspinner/)
* --- ---
* ![PrimeReact](https://primefaces.org/cdn/primereact/images/logo-100.png)
*
* @group Component
*/
export declare class ProgressSpinner extends React.Component<ProgressSpinnerProps, any> {
/**
* Used to get container element.
* @return {HTMLDivElement | null} Container element
*/
public getElement(): HTMLDivElement | null;
}
+89
View File
@@ -0,0 +1,89 @@
'use client';
import * as React from 'react';
import { PrimeReactContext } from 'primereact/api';
import { ComponentBase, useHandleStyle } from 'primereact/componentbase';
import { useMergeProps } from 'primereact/hooks';
import { classNames } from 'primereact/utils';
var classes = {
root: 'p-progress-spinner',
spinner: 'p-progress-spinner-svg',
circle: 'p-progress-spinner-circle'
};
var styles = "\n@layer primereact {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n animation: p-progress-spinner-rotate 2s linear infinite;\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n \n .p-progress-spinner-circle {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: 0;\n stroke: #d62d20;\n animation: p-progress-spinner-dash 1.5s ease-in-out infinite, p-progress-spinner-color 6s ease-in-out infinite;\n stroke-linecap: round;\n }\n}\n\n@keyframes p-progress-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@keyframes p-progress-spinner-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n\n@keyframes p-progress-spinner-color {\n 100%,\n 0% {\n stroke: #d62d20;\n }\n 40% {\n stroke: #0057e7;\n }\n 66% {\n stroke: #008744;\n }\n 80%,\n 90% {\n stroke: #ffa700;\n }\n}\n";
var inlineStyles = {
spinner: function spinner(_ref) {
var props = _ref.props;
return {
animationDuration: props.animationDuration
};
}
};
var ProgressSpinnerBase = ComponentBase.extend({
defaultProps: {
__TYPE: 'ProgressSpinner',
id: null,
style: null,
className: null,
strokeWidth: '2',
fill: 'none',
animationDuration: '2s',
children: undefined
},
css: {
classes: classes,
styles: styles,
inlineStyles: inlineStyles
}
});
var ProgressSpinner = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function (inProps, ref) {
var mergeProps = useMergeProps();
var context = React.useContext(PrimeReactContext);
var props = ProgressSpinnerBase.getProps(inProps, context);
var elementRef = React.useRef(null);
var _ProgressSpinnerBase$ = ProgressSpinnerBase.setMetaData({
props: props
}),
ptm = _ProgressSpinnerBase$.ptm,
cx = _ProgressSpinnerBase$.cx,
sx = _ProgressSpinnerBase$.sx,
isUnstyled = _ProgressSpinnerBase$.isUnstyled;
useHandleStyle(ProgressSpinnerBase.css.styles, isUnstyled, {
name: 'progressspinner'
});
React.useImperativeHandle(ref, function () {
return {
props: props,
getElement: function getElement() {
return elementRef.current;
}
};
});
var rootProps = mergeProps({
id: props.id,
ref: elementRef,
style: props.style,
className: classNames(props.className, cx('root')),
role: 'progressbar',
'aria-busy': true
}, ProgressSpinnerBase.getOtherProps(props), ptm('root'));
var spinnerProps = mergeProps({
className: cx('spinner'),
viewBox: '25 25 50 50',
style: sx('spinner')
}, ptm('spinner'));
var circleProps = mergeProps({
className: cx('circle'),
cx: '50',
cy: '50',
r: '20',
fill: props.fill,
strokeWidth: props.strokeWidth,
strokeMiterlimit: '10'
}, ptm('circle'));
return /*#__PURE__*/React.createElement("div", rootProps, /*#__PURE__*/React.createElement("svg", spinnerProps, /*#__PURE__*/React.createElement("circle", circleProps)));
}));
ProgressSpinner.displayName = 'ProgressSpinner';
export { ProgressSpinner };
+1
View File
@@ -0,0 +1 @@
import*as n from"react";import{PrimeReactContext as e}from"primereact/api";import{ComponentBase as r,useHandleStyle as s}from"primereact/componentbase";import{useMergeProps as t}from"primereact/hooks";import{classNames as o}from"primereact/utils";var i=r.extend({defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},css:{classes:{root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},styles:"\n@layer primereact {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n animation: p-progress-spinner-rotate 2s linear infinite;\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n \n .p-progress-spinner-circle {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: 0;\n stroke: #d62d20;\n animation: p-progress-spinner-dash 1.5s ease-in-out infinite, p-progress-spinner-color 6s ease-in-out infinite;\n stroke-linecap: round;\n }\n}\n\n@keyframes p-progress-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@keyframes p-progress-spinner-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n\n@keyframes p-progress-spinner-color {\n 100%,\n 0% {\n stroke: #d62d20;\n }\n 40% {\n stroke: #0057e7;\n }\n 66% {\n stroke: #008744;\n }\n 80%,\n 90% {\n stroke: #ffa700;\n }\n}\n",inlineStyles:{spinner:function(n){return{animationDuration:n.props.animationDuration}}}}}),a=n.memo(n.forwardRef((function(r,a){var p=t(),l=n.useContext(e),c=i.getProps(r,l),m=n.useRef(null),d=i.setMetaData({props:c}),f=d.ptm,g=d.cx,u=d.sx;s(i.css.styles,d.isUnstyled,{name:"progressspinner"}),n.useImperativeHandle(a,(function(){return{props:c,getElement:function(){return m.current}}}));var k=p({id:c.id,ref:m,style:c.style,className:o(c.className,g("root")),role:"progressbar","aria-busy":!0},i.getOtherProps(c),f("root")),h=p({className:g("spinner"),viewBox:"25 25 50 50",style:u("spinner")},f("spinner")),y=p({className:g("circle"),cx:"50",cy:"50",r:"20",fill:c.fill,strokeWidth:c.strokeWidth,strokeMiterlimit:"10"},f("circle"));return n.createElement("div",k,n.createElement("svg",h,n.createElement("circle",y)))})));a.displayName="ProgressSpinner";export{a as ProgressSpinner};
+112
View File
@@ -0,0 +1,112 @@
this.primereact = this.primereact || {};
this.primereact.progressspinner = (function (exports, React, api, componentbase, hooks, utils) {
'use strict';
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var classes = {
root: 'p-progress-spinner',
spinner: 'p-progress-spinner-svg',
circle: 'p-progress-spinner-circle'
};
var styles = "\n@layer primereact {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n animation: p-progress-spinner-rotate 2s linear infinite;\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n \n .p-progress-spinner-circle {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: 0;\n stroke: #d62d20;\n animation: p-progress-spinner-dash 1.5s ease-in-out infinite, p-progress-spinner-color 6s ease-in-out infinite;\n stroke-linecap: round;\n }\n}\n\n@keyframes p-progress-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@keyframes p-progress-spinner-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n\n@keyframes p-progress-spinner-color {\n 100%,\n 0% {\n stroke: #d62d20;\n }\n 40% {\n stroke: #0057e7;\n }\n 66% {\n stroke: #008744;\n }\n 80%,\n 90% {\n stroke: #ffa700;\n }\n}\n";
var inlineStyles = {
spinner: function spinner(_ref) {
var props = _ref.props;
return {
animationDuration: props.animationDuration
};
}
};
var ProgressSpinnerBase = componentbase.ComponentBase.extend({
defaultProps: {
__TYPE: 'ProgressSpinner',
id: null,
style: null,
className: null,
strokeWidth: '2',
fill: 'none',
animationDuration: '2s',
children: undefined
},
css: {
classes: classes,
styles: styles,
inlineStyles: inlineStyles
}
});
var ProgressSpinner = /*#__PURE__*/React__namespace.memo(/*#__PURE__*/React__namespace.forwardRef(function (inProps, ref) {
var mergeProps = hooks.useMergeProps();
var context = React__namespace.useContext(api.PrimeReactContext);
var props = ProgressSpinnerBase.getProps(inProps, context);
var elementRef = React__namespace.useRef(null);
var _ProgressSpinnerBase$ = ProgressSpinnerBase.setMetaData({
props: props
}),
ptm = _ProgressSpinnerBase$.ptm,
cx = _ProgressSpinnerBase$.cx,
sx = _ProgressSpinnerBase$.sx,
isUnstyled = _ProgressSpinnerBase$.isUnstyled;
componentbase.useHandleStyle(ProgressSpinnerBase.css.styles, isUnstyled, {
name: 'progressspinner'
});
React__namespace.useImperativeHandle(ref, function () {
return {
props: props,
getElement: function getElement() {
return elementRef.current;
}
};
});
var rootProps = mergeProps({
id: props.id,
ref: elementRef,
style: props.style,
className: utils.classNames(props.className, cx('root')),
role: 'progressbar',
'aria-busy': true
}, ProgressSpinnerBase.getOtherProps(props), ptm('root'));
var spinnerProps = mergeProps({
className: cx('spinner'),
viewBox: '25 25 50 50',
style: sx('spinner')
}, ptm('spinner'));
var circleProps = mergeProps({
className: cx('circle'),
cx: '50',
cy: '50',
r: '20',
fill: props.fill,
strokeWidth: props.strokeWidth,
strokeMiterlimit: '10'
}, ptm('circle'));
return /*#__PURE__*/React__namespace.createElement("div", rootProps, /*#__PURE__*/React__namespace.createElement("svg", spinnerProps, /*#__PURE__*/React__namespace.createElement("circle", circleProps)));
}));
ProgressSpinner.displayName = 'ProgressSpinner';
exports.ProgressSpinner = ProgressSpinner;
Object.defineProperty(exports, '__esModule', { value: true });
return exports;
})({}, React, primereact.api, primereact.componentbase, primereact.hooks, primereact.utils);
+1
View File
@@ -0,0 +1 @@
this.primereact=this.primereact||{},this.primereact.progressspinner=function(e,n,r,s,t,i){"use strict";function o(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}})),n.default=e,Object.freeze(n)}var a=o(n),p=s.ComponentBase.extend({defaultProps:{__TYPE:"ProgressSpinner",id:null,style:null,className:null,strokeWidth:"2",fill:"none",animationDuration:"2s",children:void 0},css:{classes:{root:"p-progress-spinner",spinner:"p-progress-spinner-svg",circle:"p-progress-spinner-circle"},styles:"\n@layer primereact {\n .p-progress-spinner {\n position: relative;\n margin: 0 auto;\n width: 100px;\n height: 100px;\n display: inline-block;\n }\n \n .p-progress-spinner::before {\n content: '';\n display: block;\n padding-top: 100%;\n }\n \n .p-progress-spinner-svg {\n animation: p-progress-spinner-rotate 2s linear infinite;\n height: 100%;\n transform-origin: center center;\n width: 100%;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n margin: auto;\n }\n \n .p-progress-spinner-circle {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: 0;\n stroke: #d62d20;\n animation: p-progress-spinner-dash 1.5s ease-in-out infinite, p-progress-spinner-color 6s ease-in-out infinite;\n stroke-linecap: round;\n }\n}\n\n@keyframes p-progress-spinner-rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n@keyframes p-progress-spinner-dash {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n}\n\n@keyframes p-progress-spinner-color {\n 100%,\n 0% {\n stroke: #d62d20;\n }\n 40% {\n stroke: #0057e7;\n }\n 66% {\n stroke: #008744;\n }\n 80%,\n 90% {\n stroke: #ffa700;\n }\n}\n",inlineStyles:{spinner:function(e){return{animationDuration:e.props.animationDuration}}}}}),l=a.memo(a.forwardRef((function(e,n){var o=t.useMergeProps(),l=a.useContext(r.PrimeReactContext),c=p.getProps(e,l),u=a.useRef(null),d=p.setMetaData({props:c}),f=d.ptm,m=d.cx,g=d.sx;s.useHandleStyle(p.css.styles,d.isUnstyled,{name:"progressspinner"}),a.useImperativeHandle(n,(function(){return{props:c,getElement:function(){return u.current}}}));var h=o({id:c.id,ref:u,style:c.style,className:i.classNames(c.className,m("root")),role:"progressbar","aria-busy":!0},p.getOtherProps(c),f("root")),y=o({className:m("spinner"),viewBox:"25 25 50 50",style:g("spinner")},f("spinner")),k=o({className:m("circle"),cx:"50",cy:"50",r:"20",fill:c.fill,strokeWidth:c.strokeWidth,strokeMiterlimit:"10"},f("circle"));return a.createElement("div",h,a.createElement("svg",y,a.createElement("circle",k)))})));return l.displayName="ProgressSpinner",e.ProgressSpinner=l,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.hooks,primereact.utils);