aiware-js 1.0.0-master.1122 → 1.0.0-master.1123

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/index.esm.css CHANGED
@@ -288,98 +288,6 @@
288
288
  background-color: #fff;
289
289
  }
290
290
 
291
- /* dosis-200normal - latin */
292
- @font-face {
293
- font-family: 'Dosis';
294
- font-style: normal;
295
- font-display: swap;
296
- font-weight: 200;
297
- src:
298
- local('Dosis Extra Light '),
299
- local('Dosis-Extra Light'),
300
- url('./files/dosis-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
301
- url('./files/dosis-latin-200.woff') format('woff'); /* Modern Browsers */
302
- }
303
-
304
- /* dosis-300normal - latin */
305
- @font-face {
306
- font-family: 'Dosis';
307
- font-style: normal;
308
- font-display: swap;
309
- font-weight: 300;
310
- src:
311
- local('Dosis Light '),
312
- local('Dosis-Light'),
313
- url('./files/dosis-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
314
- url('./files/dosis-latin-300.woff') format('woff'); /* Modern Browsers */
315
- }
316
-
317
- /* dosis-400normal - latin */
318
- @font-face {
319
- font-family: 'Dosis';
320
- font-style: normal;
321
- font-display: swap;
322
- font-weight: 400;
323
- src:
324
- local('Dosis Regular '),
325
- local('Dosis-Regular'),
326
- url('./files/dosis-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
327
- url('./files/dosis-latin-400.woff') format('woff'); /* Modern Browsers */
328
- }
329
-
330
- /* dosis-500normal - latin */
331
- @font-face {
332
- font-family: 'Dosis';
333
- font-style: normal;
334
- font-display: swap;
335
- font-weight: 500;
336
- src:
337
- local('Dosis Medium '),
338
- local('Dosis-Medium'),
339
- url('./files/dosis-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
340
- url('./files/dosis-latin-500.woff') format('woff'); /* Modern Browsers */
341
- }
342
-
343
- /* dosis-600normal - latin */
344
- @font-face {
345
- font-family: 'Dosis';
346
- font-style: normal;
347
- font-display: swap;
348
- font-weight: 600;
349
- src:
350
- local('Dosis SemiBold '),
351
- local('Dosis-SemiBold'),
352
- url('./files/dosis-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
353
- url('./files/dosis-latin-600.woff') format('woff'); /* Modern Browsers */
354
- }
355
-
356
- /* dosis-700normal - latin */
357
- @font-face {
358
- font-family: 'Dosis';
359
- font-style: normal;
360
- font-display: swap;
361
- font-weight: 700;
362
- src:
363
- local('Dosis Bold '),
364
- local('Dosis-Bold'),
365
- url('./files/dosis-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
366
- url('./files/dosis-latin-700.woff') format('woff'); /* Modern Browsers */
367
- }
368
-
369
- /* dosis-800normal - latin */
370
- @font-face {
371
- font-family: 'Dosis';
372
- font-style: normal;
373
- font-display: swap;
374
- font-weight: 800;
375
- src:
376
- local('Dosis ExtraBold '),
377
- local('Dosis-ExtraBold'),
378
- url('./files/dosis-latin-800.woff2') format('woff2'), /* Super Modern Browsers */
379
- url('./files/dosis-latin-800.woff') format('woff'); /* Modern Browsers */
380
- }
381
-
382
-
383
291
  /* nunito-200normal - latin */
384
292
  @font-face {
385
293
  font-family: 'Nunito';
@@ -563,6 +471,98 @@
563
471
  }
564
472
 
565
473
 
474
+ /* dosis-200normal - latin */
475
+ @font-face {
476
+ font-family: 'Dosis';
477
+ font-style: normal;
478
+ font-display: swap;
479
+ font-weight: 200;
480
+ src:
481
+ local('Dosis Extra Light '),
482
+ local('Dosis-Extra Light'),
483
+ url('./files/dosis-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
484
+ url('./files/dosis-latin-200.woff') format('woff'); /* Modern Browsers */
485
+ }
486
+
487
+ /* dosis-300normal - latin */
488
+ @font-face {
489
+ font-family: 'Dosis';
490
+ font-style: normal;
491
+ font-display: swap;
492
+ font-weight: 300;
493
+ src:
494
+ local('Dosis Light '),
495
+ local('Dosis-Light'),
496
+ url('./files/dosis-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
497
+ url('./files/dosis-latin-300.woff') format('woff'); /* Modern Browsers */
498
+ }
499
+
500
+ /* dosis-400normal - latin */
501
+ @font-face {
502
+ font-family: 'Dosis';
503
+ font-style: normal;
504
+ font-display: swap;
505
+ font-weight: 400;
506
+ src:
507
+ local('Dosis Regular '),
508
+ local('Dosis-Regular'),
509
+ url('./files/dosis-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
510
+ url('./files/dosis-latin-400.woff') format('woff'); /* Modern Browsers */
511
+ }
512
+
513
+ /* dosis-500normal - latin */
514
+ @font-face {
515
+ font-family: 'Dosis';
516
+ font-style: normal;
517
+ font-display: swap;
518
+ font-weight: 500;
519
+ src:
520
+ local('Dosis Medium '),
521
+ local('Dosis-Medium'),
522
+ url('./files/dosis-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
523
+ url('./files/dosis-latin-500.woff') format('woff'); /* Modern Browsers */
524
+ }
525
+
526
+ /* dosis-600normal - latin */
527
+ @font-face {
528
+ font-family: 'Dosis';
529
+ font-style: normal;
530
+ font-display: swap;
531
+ font-weight: 600;
532
+ src:
533
+ local('Dosis SemiBold '),
534
+ local('Dosis-SemiBold'),
535
+ url('./files/dosis-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
536
+ url('./files/dosis-latin-600.woff') format('woff'); /* Modern Browsers */
537
+ }
538
+
539
+ /* dosis-700normal - latin */
540
+ @font-face {
541
+ font-family: 'Dosis';
542
+ font-style: normal;
543
+ font-display: swap;
544
+ font-weight: 700;
545
+ src:
546
+ local('Dosis Bold '),
547
+ local('Dosis-Bold'),
548
+ url('./files/dosis-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
549
+ url('./files/dosis-latin-700.woff') format('woff'); /* Modern Browsers */
550
+ }
551
+
552
+ /* dosis-800normal - latin */
553
+ @font-face {
554
+ font-family: 'Dosis';
555
+ font-style: normal;
556
+ font-display: swap;
557
+ font-weight: 800;
558
+ src:
559
+ local('Dosis ExtraBold '),
560
+ local('Dosis-ExtraBold'),
561
+ url('./files/dosis-latin-800.woff2') format('woff2'), /* Super Modern Browsers */
562
+ url('./files/dosis-latin-800.woff') format('woff'); /* Modern Browsers */
563
+ }
564
+
565
+
566
566
  /*!
567
567
  * Cropper.js v1.5.9
568
568
  * https://fengyuanchen.github.io/cropperjs
package/index.esm.css.gz CHANGED
Binary file
package/index.esm.min.css CHANGED
@@ -288,98 +288,6 @@
288
288
  background-color: #fff;
289
289
  }
290
290
 
291
- /* dosis-200normal - latin */
292
- @font-face {
293
- font-family: 'Dosis';
294
- font-style: normal;
295
- font-display: swap;
296
- font-weight: 200;
297
- src:
298
- local('Dosis Extra Light '),
299
- local('Dosis-Extra Light'),
300
- url('./files/dosis-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
301
- url('./files/dosis-latin-200.woff') format('woff'); /* Modern Browsers */
302
- }
303
-
304
- /* dosis-300normal - latin */
305
- @font-face {
306
- font-family: 'Dosis';
307
- font-style: normal;
308
- font-display: swap;
309
- font-weight: 300;
310
- src:
311
- local('Dosis Light '),
312
- local('Dosis-Light'),
313
- url('./files/dosis-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
314
- url('./files/dosis-latin-300.woff') format('woff'); /* Modern Browsers */
315
- }
316
-
317
- /* dosis-400normal - latin */
318
- @font-face {
319
- font-family: 'Dosis';
320
- font-style: normal;
321
- font-display: swap;
322
- font-weight: 400;
323
- src:
324
- local('Dosis Regular '),
325
- local('Dosis-Regular'),
326
- url('./files/dosis-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
327
- url('./files/dosis-latin-400.woff') format('woff'); /* Modern Browsers */
328
- }
329
-
330
- /* dosis-500normal - latin */
331
- @font-face {
332
- font-family: 'Dosis';
333
- font-style: normal;
334
- font-display: swap;
335
- font-weight: 500;
336
- src:
337
- local('Dosis Medium '),
338
- local('Dosis-Medium'),
339
- url('./files/dosis-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
340
- url('./files/dosis-latin-500.woff') format('woff'); /* Modern Browsers */
341
- }
342
-
343
- /* dosis-600normal - latin */
344
- @font-face {
345
- font-family: 'Dosis';
346
- font-style: normal;
347
- font-display: swap;
348
- font-weight: 600;
349
- src:
350
- local('Dosis SemiBold '),
351
- local('Dosis-SemiBold'),
352
- url('./files/dosis-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
353
- url('./files/dosis-latin-600.woff') format('woff'); /* Modern Browsers */
354
- }
355
-
356
- /* dosis-700normal - latin */
357
- @font-face {
358
- font-family: 'Dosis';
359
- font-style: normal;
360
- font-display: swap;
361
- font-weight: 700;
362
- src:
363
- local('Dosis Bold '),
364
- local('Dosis-Bold'),
365
- url('./files/dosis-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
366
- url('./files/dosis-latin-700.woff') format('woff'); /* Modern Browsers */
367
- }
368
-
369
- /* dosis-800normal - latin */
370
- @font-face {
371
- font-family: 'Dosis';
372
- font-style: normal;
373
- font-display: swap;
374
- font-weight: 800;
375
- src:
376
- local('Dosis ExtraBold '),
377
- local('Dosis-ExtraBold'),
378
- url('./files/dosis-latin-800.woff2') format('woff2'), /* Super Modern Browsers */
379
- url('./files/dosis-latin-800.woff') format('woff'); /* Modern Browsers */
380
- }
381
-
382
-
383
291
  /* nunito-200normal - latin */
384
292
  @font-face {
385
293
  font-family: 'Nunito';
@@ -563,6 +471,98 @@
563
471
  }
564
472
 
565
473
 
474
+ /* dosis-200normal - latin */
475
+ @font-face {
476
+ font-family: 'Dosis';
477
+ font-style: normal;
478
+ font-display: swap;
479
+ font-weight: 200;
480
+ src:
481
+ local('Dosis Extra Light '),
482
+ local('Dosis-Extra Light'),
483
+ url('./files/dosis-latin-200.woff2') format('woff2'), /* Super Modern Browsers */
484
+ url('./files/dosis-latin-200.woff') format('woff'); /* Modern Browsers */
485
+ }
486
+
487
+ /* dosis-300normal - latin */
488
+ @font-face {
489
+ font-family: 'Dosis';
490
+ font-style: normal;
491
+ font-display: swap;
492
+ font-weight: 300;
493
+ src:
494
+ local('Dosis Light '),
495
+ local('Dosis-Light'),
496
+ url('./files/dosis-latin-300.woff2') format('woff2'), /* Super Modern Browsers */
497
+ url('./files/dosis-latin-300.woff') format('woff'); /* Modern Browsers */
498
+ }
499
+
500
+ /* dosis-400normal - latin */
501
+ @font-face {
502
+ font-family: 'Dosis';
503
+ font-style: normal;
504
+ font-display: swap;
505
+ font-weight: 400;
506
+ src:
507
+ local('Dosis Regular '),
508
+ local('Dosis-Regular'),
509
+ url('./files/dosis-latin-400.woff2') format('woff2'), /* Super Modern Browsers */
510
+ url('./files/dosis-latin-400.woff') format('woff'); /* Modern Browsers */
511
+ }
512
+
513
+ /* dosis-500normal - latin */
514
+ @font-face {
515
+ font-family: 'Dosis';
516
+ font-style: normal;
517
+ font-display: swap;
518
+ font-weight: 500;
519
+ src:
520
+ local('Dosis Medium '),
521
+ local('Dosis-Medium'),
522
+ url('./files/dosis-latin-500.woff2') format('woff2'), /* Super Modern Browsers */
523
+ url('./files/dosis-latin-500.woff') format('woff'); /* Modern Browsers */
524
+ }
525
+
526
+ /* dosis-600normal - latin */
527
+ @font-face {
528
+ font-family: 'Dosis';
529
+ font-style: normal;
530
+ font-display: swap;
531
+ font-weight: 600;
532
+ src:
533
+ local('Dosis SemiBold '),
534
+ local('Dosis-SemiBold'),
535
+ url('./files/dosis-latin-600.woff2') format('woff2'), /* Super Modern Browsers */
536
+ url('./files/dosis-latin-600.woff') format('woff'); /* Modern Browsers */
537
+ }
538
+
539
+ /* dosis-700normal - latin */
540
+ @font-face {
541
+ font-family: 'Dosis';
542
+ font-style: normal;
543
+ font-display: swap;
544
+ font-weight: 700;
545
+ src:
546
+ local('Dosis Bold '),
547
+ local('Dosis-Bold'),
548
+ url('./files/dosis-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
549
+ url('./files/dosis-latin-700.woff') format('woff'); /* Modern Browsers */
550
+ }
551
+
552
+ /* dosis-800normal - latin */
553
+ @font-face {
554
+ font-family: 'Dosis';
555
+ font-style: normal;
556
+ font-display: swap;
557
+ font-weight: 800;
558
+ src:
559
+ local('Dosis ExtraBold '),
560
+ local('Dosis-ExtraBold'),
561
+ url('./files/dosis-latin-800.woff2') format('woff2'), /* Super Modern Browsers */
562
+ url('./files/dosis-latin-800.woff') format('woff'); /* Modern Browsers */
563
+ }
564
+
565
+
566
566
  /*!
567
567
  * Cropper.js v1.5.9
568
568
  * https://fengyuanchen.github.io/cropperjs
Binary file
package/js-core.esm102.js CHANGED
@@ -1 +1 @@
1
- import{d as selectButtonColor,e as selectButtonTextColor,S as SHARED_TEXT,p as actions,r as actions$2,q as CUSTOM_LOGIN_PANEL_ID}from"./js-core.esm70.js";import{Z as useSelector,j as jsxRuntime,ao as Box,a1 as hidePanel}from"./js-core.esm.js";import{l as Stack,aC as CustomColorInput,aD as ButtonPreview}from"./js-core.esm6.js";import{T as Typography,h as Button}from"./js-core.esm5.js";import{u as useDispatch}from"./js-core.esm7.js";const CustomLoginConfigurationStep=()=>{const o=useDispatch();var t=useSelector(selectButtonColor),e=useSelector(selectButtonTextColor);return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",gap:"20px",sx:{height:"90%",position:"relative",overflow:"auto"}},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginTop:"25px",marginBottom:"30px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{fontWeight:600,fontSize:"16px",marginBottom:"5px"}},{children:SHARED_TEXT.configurationStep.title()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:400,fontSize:"14px"}},{children:SHARED_TEXT.configurationStep.description()})),jsxRuntime.exports.jsx(CustomColorInput,{isButtonColorRequired:!1,onReset:()=>o(actions.resetButton()),buttonColor:t,buttonTextColor:e,onChangeButtonColor:t=>o(actions.setButtonColor(t)),onChangeTextColor:t=>o(actions.setButtonTextColor(t))})]})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(ButtonPreview,{buttonColor:t,buttonTextColor:e})})]})),jsxRuntime.exports.jsx(Footer,{onBack:()=>{o(actions$2.setActiveStep(1))},onSave:()=>{o(actions$2.updateLoginConfigStart()),o(hidePanel(CUSTOM_LOGIN_PANEL_ID))}})]}))},Footer=({onBack:t,onSave:o})=>jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",sx:{padding:"60px 0 30px 30px",display:"flex",justifyContent:"flex-end",height:"10%",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:t,disabled:!1,variant:"text","data-testid":"admin-center-custom-login--back-btn",sx:{marginRight:"15px"}},{children:SHARED_TEXT.configurationStep.backBtn()})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:o,disabled:!1,variant:"contained","data-testid":"admin-center-custom-login--create-btn"},{children:SHARED_TEXT.configurationStep.createBtn()}))]}));export{CustomLoginConfigurationStep as default};
1
+ import{d as selectButtonColor,e as selectButtonTextColor,S as SHARED_TEXT,p as actions,r as actions$2,q as CUSTOM_LOGIN_PANEL_ID}from"./js-core.esm70.js";import{Z as useSelector,j as jsxRuntime,ao as Box,a1 as hidePanel}from"./js-core.esm.js";import{l as Stack,aD as CustomColorInput,aE as ButtonPreview}from"./js-core.esm6.js";import{T as Typography,h as Button}from"./js-core.esm5.js";import{u as useDispatch}from"./js-core.esm7.js";const CustomLoginConfigurationStep=()=>{const o=useDispatch();var t=useSelector(selectButtonColor),e=useSelector(selectButtonTextColor);return jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",gap:"20px",sx:{height:"90%",position:"relative",overflow:"auto"}},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginTop:"25px",marginBottom:"30px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{fontWeight:600,fontSize:"16px",marginBottom:"5px"}},{children:SHARED_TEXT.configurationStep.title()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption",sx:{fontWeight:400,fontSize:"14px"}},{children:SHARED_TEXT.configurationStep.description()})),jsxRuntime.exports.jsx(CustomColorInput,{isButtonColorRequired:!1,onReset:()=>o(actions.resetButton()),buttonColor:t,buttonTextColor:e,onChangeButtonColor:t=>o(actions.setButtonColor(t)),onChangeTextColor:t=>o(actions.setButtonTextColor(t))})]})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(ButtonPreview,{buttonColor:t,buttonTextColor:e})})]})),jsxRuntime.exports.jsx(Footer,{onBack:()=>{o(actions$2.setActiveStep(1))},onSave:()=>{o(actions$2.updateLoginConfigStart()),o(hidePanel(CUSTOM_LOGIN_PANEL_ID))}})]}))},Footer=({onBack:t,onSave:o})=>jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",sx:{padding:"60px 0 30px 30px",display:"flex",justifyContent:"flex-end",height:"10%",alignItems:"center"}},{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:t,disabled:!1,variant:"text","data-testid":"admin-center-custom-login--back-btn",sx:{marginRight:"15px"}},{children:SHARED_TEXT.configurationStep.backBtn()})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:o,disabled:!1,variant:"contained","data-testid":"admin-center-custom-login--create-btn"},{children:SHARED_TEXT.configurationStep.createBtn()}))]}));export{CustomLoginConfigurationStep as default};
Binary file
package/js-core.esm116.js CHANGED
@@ -1 +1 @@
1
- import{s as selectPreviewImage,a as selectPackageName,b as selectPackageDescription,c as selectDistributionType,d as selectors$7,e as selectIsEditMode,f as selectOriginalPackageName,g as actions,S as SHARED_TEXT,P as PDistributionType}from"./js-core.esm87.js";import{Z as useSelector,fJ as selectUserCanCreatePackage,r as react,j as jsxRuntime,ao as Box,an as CircularProgress}from"./js-core.esm.js";import{m as makeStyles,F as FormControl,T as Typography,cd as Information,S as Select,U as MenuItem}from"./js-core.esm5.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm117.js";import{p as debounce_1,l as Stack,T as TextField,d as Tooltip,I as IconButton,n as imageUpload,aA as characterCountTextField,c as CheckCircle,aE as Error}from"./js-core.esm6.js";import"./js-core.esm14.js";import"./js-core.esm13.js";import"./js-core.esm9.js";import"./js-core.esm85.js";import"./js-core.esm59.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm83.js";import"./js-core.esm36.js";import"./js-core.esm3.js";import"./js-core.esm4.js";import"./js-core.esm28.js";import"./js-core.esm55.js";import"./js-core.esm45.js";import"./js-core.esm49.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm2.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm17.js";import"./js-core.esm51.js";import"./js-core.esm54.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm53.js";import"./js-core.esm52.js";const{ImageUpload}=imageUpload["jsx"],{CharacterCountTextField}=characterCountTextField["jsx"],useStyles=makeStyles()(e=>({formControlWrapper:{marginTop:15,width:"100%"}})),menuItemValueContainerSx={width:"472px"},menuItemValueSx={fontSize:"14px",fontWeight:400,marginBottom:"5px",display:"block"},menuItemValueDescSx={fontSize:"12px",color:"#424242",marginTop:0,textTransform:"none",textWrap:"wrap",whiteSpace:"pre-line"},BasicInfoStep=()=>{var e=useStyles()["classes"],s=useSelector(selectPreviewImage);const t=useDispatch(),i=useSelector(selectPackageName)||"";var a=useSelector(selectPackageDescription)||"",r=useSelector(selectDistributionType),n=useSelector(selectUserCanCreatePackage),o=useSelector(selectors$7.selectItems)||[],c=useSelector(selectors$7.selectReadStatus);const p=useSelector(selectIsEditMode),x=useSelector(selectOriginalPackageName);const l=react.exports.useCallback(debounce_1(e=>{t(actions.allOrgOwnedPackages.setSearchValue(e)),t(actions.allOrgOwnedPackages.resetList(null)),t(actions.allOrgOwnedPackages.readStart(null))},400),[]),m=void 0===o.find(e=>e.name===i),j=0<i.length,u="pending"===c;return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",alignItems:"flex-start",sx:{marginTop:"10px"}},{children:[jsxRuntime.exports.jsx(Box,Object.assign({id:"meta-info-section",sx:{width:"100%"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row"},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({id:"package-image-section",sx:{width:"180px"}},{children:[jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(ImageUpload,{image:s,getUrl:!0,handleChange:e=>{var s;e.unsignedUrl?(s=e.unsignedUrl,e=e.getUrl,t(actions.basicInfo.setIcon(s)),t(actions.basicInfo.setPreviewImage(e))):(t(actions.basicInfo.setIcon("")),t(actions.basicInfo.setPreviewImage("")))},testId:"rc-pm-image"})})),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{paddingRight:"20px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",sx:{fontSize:"14px",fontWeight:600,marginBottom:"5px",marginTop:"15px"}},{children:SHARED_TEXT.basicInfoStep.packageImageLabel})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{marginTop:0,fontSize:"12px",lineHeight:"16px"}},{children:SHARED_TEXT.basicInfoStep.packageImageLabelDesc}))]}))]})),jsxRuntime.exports.jsx(Box,Object.assign({id:"basic-info-section",sx:{width:"100%",paddingLeft:"15px"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",justifyContent:"flex-start"},{children:[jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(TextField,{sx:{width:"100%"},error:!m,id:"package-manager-name",label:SHARED_TEXT.basicInfoStep.packageName,onChange:e=>{e=e.target.value;t(actions.basicInfo.setPackageName(e)),p&&e===x||l(e)},variant:"outlined",disabled:!n,InputLabelProps:0<i.length?{shrink:!0}:{},inputProps:{maxLength:100},value:i,helperText:(()=>{let e=SHARED_TEXT.basicInfoStep.packageNameIsAvailable,s=jsxRuntime.exports.jsx(CheckCircle,{sx:{fontSize:"14px",color:"#40c057"}});return j||(e=SHARED_TEXT.basicInfoStep.packageNameRequired,s=void 0),m||(e=SHARED_TEXT.basicInfoStep.errorPackageName,s=jsxRuntime.exports.jsx(Error,{sx:{fontSize:"14px",color:"inherit"}})),u&&(e=SHARED_TEXT.basicInfoStep.packageNameCheck,s=jsxRuntime.exports.jsx(CircularProgress,{size:12})),jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{color:"inherit",gap:"3px",transform:"translateX(-12px)"},direction:"row",alignItems:"center"},{children:[s&&jsxRuntime.exports.jsx(Stack,Object.assign({sx:{width:"15px",height:"15px",alignItems:"center",justifyContent:"center"}},{children:s})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{height:"15px",color:"inherit"},variant:"caption"},{children:e}))]}))})(),required:!0,"data-test":"rc-pm-package-name"})})),jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(CharacterCountTextField,{handleChange:e=>{t(actions.basicInfo.setPackageDescription(e))},variant:"outlined",value:a,defaultValue:a,label:SHARED_TEXT.basicInfoStep.packageDescription,lines:5,maxChar:300,error:!1,shrinkAlways:!1,testId:"rc-pm-package-description",disabled:!n})}))]}))}))]}))})),jsxRuntime.exports.jsxs(Box,Object.assign({id:"distribution-section",sx:{width:"100%",borderTop:"1px solid #DADFE8",marginTop:"20px",paddingTop:"15px"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{fontSize:"16px",fontWeight:700,margin:0,color:e=>e.palette.text.primary}},{children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel,"data-testid":"rc-pm-distribution-info-tooltip"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({size:"small",onClick:()=>{window.open("https://docs.veritone.com/#/aiware-OS/resource-center/manage-packages?id=distribution-types-for-packages","noopener","noreferrer")}},{children:jsxRuntime.exports.jsx(Information,{sx:{fontSize:"18px",color:"#424242"}})}))}))]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontSize:"14px",fontWeight:400,color:e=>e.palette.text.secondary,marginBottom:0,marginTop:"5px",width:"100%"}},{children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabelDesc})),jsxRuntime.exports.jsx(FormControl,{children:jsxRuntime.exports.jsxs(Select,Object.assign({disabled:!n,"data-test":"rc-pm-package-distribution-select",variant:"outlined",sx:{width:"320px",marginTop:"15px"},displayEmpty:!0,required:!0,labelId:"dropdown-label",id:"dropdown-select",inputProps:{"aria-label":"Without label"},value:r,onChange:e=>{e=e.target.value;t(actions.basicInfo.setDistributionType(e))},renderValue:e=>jsxRuntime.exports.jsx("span",{children:e})},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-public",value:PDistributionType.Public},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPublic})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPublicDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-private",value:PDistributionType.Private},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPrivate})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPrivateDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-shareable",value:PDistributionType.Sharable},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionShareable})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionShareableDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-orglocked",value:PDistributionType.OrgLocked},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLocked})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLockedDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-instancelocked",value:PDistributionType.InstanceLocked},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLocked})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLockedDesc})),jsxRuntime.exports.jsx("br",{})]}))}))]}))})]}))]})),jsxRuntime.exports.jsx(PanelControls,{invalidFields:!1,disableNext:!j||!m||!r||!n||u,disableBack:!1,nextButtonType:ENextButtonType.NEXT})]})};export{BasicInfoStep as default};
1
+ import{s as selectPreviewImage,a as selectPackageName,b as selectPackageDescription,c as selectDistributionType,d as selectors$7,e as selectIsEditMode,f as selectOriginalPackageName,g as actions,S as SHARED_TEXT,P as PDistributionType}from"./js-core.esm87.js";import{Z as useSelector,fJ as selectUserCanCreatePackage,r as react,j as jsxRuntime,ao as Box,an as CircularProgress}from"./js-core.esm.js";import{m as makeStyles,F as FormControl,T as Typography,cd as Information,S as Select,U as MenuItem}from"./js-core.esm5.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm117.js";import{p as debounce_1,l as Stack,T as TextField,d as Tooltip,I as IconButton,n as imageUpload,aA as characterCountTextField,c as CheckCircle,aF as Error}from"./js-core.esm6.js";import"./js-core.esm14.js";import"./js-core.esm13.js";import"./js-core.esm9.js";import"./js-core.esm85.js";import"./js-core.esm59.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm83.js";import"./js-core.esm36.js";import"./js-core.esm3.js";import"./js-core.esm4.js";import"./js-core.esm28.js";import"./js-core.esm55.js";import"./js-core.esm45.js";import"./js-core.esm49.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm2.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm17.js";import"./js-core.esm51.js";import"./js-core.esm54.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm53.js";import"./js-core.esm52.js";const{ImageUpload}=imageUpload["jsx"],{CharacterCountTextField}=characterCountTextField["jsx"],useStyles=makeStyles()(e=>({formControlWrapper:{marginTop:15,width:"100%"}})),menuItemValueContainerSx={width:"472px"},menuItemValueSx={fontSize:"14px",fontWeight:400,marginBottom:"5px",display:"block"},menuItemValueDescSx={fontSize:"12px",color:"#424242",marginTop:0,textTransform:"none",textWrap:"wrap",whiteSpace:"pre-line"},BasicInfoStep=()=>{var e=useStyles()["classes"],s=useSelector(selectPreviewImage);const t=useDispatch(),i=useSelector(selectPackageName)||"";var a=useSelector(selectPackageDescription)||"",r=useSelector(selectDistributionType),n=useSelector(selectUserCanCreatePackage),o=useSelector(selectors$7.selectItems)||[],c=useSelector(selectors$7.selectReadStatus);const p=useSelector(selectIsEditMode),x=useSelector(selectOriginalPackageName);const l=react.exports.useCallback(debounce_1(e=>{t(actions.allOrgOwnedPackages.setSearchValue(e)),t(actions.allOrgOwnedPackages.resetList(null)),t(actions.allOrgOwnedPackages.readStart(null))},400),[]),m=void 0===o.find(e=>e.name===i),j=0<i.length,u="pending"===c;return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",alignItems:"flex-start",sx:{marginTop:"10px"}},{children:[jsxRuntime.exports.jsx(Box,Object.assign({id:"meta-info-section",sx:{width:"100%"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row"},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({id:"package-image-section",sx:{width:"180px"}},{children:[jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(ImageUpload,{image:s,getUrl:!0,handleChange:e=>{var s;e.unsignedUrl?(s=e.unsignedUrl,e=e.getUrl,t(actions.basicInfo.setIcon(s)),t(actions.basicInfo.setPreviewImage(e))):(t(actions.basicInfo.setIcon("")),t(actions.basicInfo.setPreviewImage("")))},testId:"rc-pm-image"})})),jsxRuntime.exports.jsxs(Box,Object.assign({sx:{paddingRight:"20px"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",sx:{fontSize:"14px",fontWeight:600,marginBottom:"5px",marginTop:"15px"}},{children:SHARED_TEXT.basicInfoStep.packageImageLabel})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{marginTop:0,fontSize:"12px",lineHeight:"16px"}},{children:SHARED_TEXT.basicInfoStep.packageImageLabelDesc}))]}))]})),jsxRuntime.exports.jsx(Box,Object.assign({id:"basic-info-section",sx:{width:"100%",paddingLeft:"15px"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"column",justifyContent:"flex-start"},{children:[jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(TextField,{sx:{width:"100%"},error:!m,id:"package-manager-name",label:SHARED_TEXT.basicInfoStep.packageName,onChange:e=>{e=e.target.value;t(actions.basicInfo.setPackageName(e)),p&&e===x||l(e)},variant:"outlined",disabled:!n,InputLabelProps:0<i.length?{shrink:!0}:{},inputProps:{maxLength:100},value:i,helperText:(()=>{let e=SHARED_TEXT.basicInfoStep.packageNameIsAvailable,s=jsxRuntime.exports.jsx(CheckCircle,{sx:{fontSize:"14px",color:"#40c057"}});return j||(e=SHARED_TEXT.basicInfoStep.packageNameRequired,s=void 0),m||(e=SHARED_TEXT.basicInfoStep.errorPackageName,s=jsxRuntime.exports.jsx(Error,{sx:{fontSize:"14px",color:"inherit"}})),u&&(e=SHARED_TEXT.basicInfoStep.packageNameCheck,s=jsxRuntime.exports.jsx(CircularProgress,{size:12})),jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{color:"inherit",gap:"3px",transform:"translateX(-12px)"},direction:"row",alignItems:"center"},{children:[s&&jsxRuntime.exports.jsx(Stack,Object.assign({sx:{width:"15px",height:"15px",alignItems:"center",justifyContent:"center"}},{children:s})),jsxRuntime.exports.jsx(Typography,Object.assign({sx:{height:"15px",color:"inherit"},variant:"caption"},{children:e}))]}))})(),required:!0,"data-test":"rc-pm-package-name"})})),jsxRuntime.exports.jsx(FormControl,Object.assign({className:e.formControlWrapper,error:!0},{children:jsxRuntime.exports.jsx(CharacterCountTextField,{handleChange:e=>{t(actions.basicInfo.setPackageDescription(e))},variant:"outlined",value:a,defaultValue:a,label:SHARED_TEXT.basicInfoStep.packageDescription,lines:5,maxChar:300,error:!1,shrinkAlways:!1,testId:"rc-pm-package-description",disabled:!n})}))]}))}))]}))})),jsxRuntime.exports.jsxs(Box,Object.assign({id:"distribution-section",sx:{width:"100%",borderTop:"1px solid #DADFE8",marginTop:"20px",paddingTop:"15px"}},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",alignItems:"center"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:{fontSize:"16px",fontWeight:700,margin:0,color:e=>e.palette.text.primary}},{children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabel,"data-testid":"rc-pm-distribution-info-tooltip"},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({size:"small",onClick:()=>{window.open("https://docs.veritone.com/#/aiware-OS/resource-center/manage-packages?id=distribution-types-for-packages","noopener","noreferrer")}},{children:jsxRuntime.exports.jsx(Information,{sx:{fontSize:"18px",color:"#424242"}})}))}))]})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontSize:"14px",fontWeight:400,color:e=>e.palette.text.secondary,marginBottom:0,marginTop:"5px",width:"100%"}},{children:SHARED_TEXT.basicInfoStep.packageDistributionTypeLabelDesc})),jsxRuntime.exports.jsx(FormControl,{children:jsxRuntime.exports.jsxs(Select,Object.assign({disabled:!n,"data-test":"rc-pm-package-distribution-select",variant:"outlined",sx:{width:"320px",marginTop:"15px"},displayEmpty:!0,required:!0,labelId:"dropdown-label",id:"dropdown-select",inputProps:{"aria-label":"Without label"},value:r,onChange:e=>{e=e.target.value;t(actions.basicInfo.setDistributionType(e))},renderValue:e=>jsxRuntime.exports.jsx("span",{children:e})},{children:[jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-public",value:PDistributionType.Public},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPublic})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPublicDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-private",value:PDistributionType.Private},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPrivate})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionPrivateDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-shareable",value:PDistributionType.Sharable},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionShareable})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionShareableDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-orglocked",value:PDistributionType.OrgLocked},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLocked})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionOrgLockedDesc}))]}))})),jsxRuntime.exports.jsx(MenuItem,Object.assign({"data-test":"rc-pm-package-distribution-select-instancelocked",value:PDistributionType.InstanceLocked},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:menuItemValueContainerSx},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3",sx:menuItemValueSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLocked})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:menuItemValueDescSx},{children:SHARED_TEXT.basicInfoStep.labelDistributionInstanceLockedDesc})),jsxRuntime.exports.jsx("br",{})]}))}))]}))})]}))]})),jsxRuntime.exports.jsx(PanelControls,{invalidFields:!1,disableNext:!j||!m||!r||!n||u,disableBack:!1,nextButtonType:ENextButtonType.NEXT})]})};export{BasicInfoStep as default};
Binary file
package/js-core.esm118.js CHANGED
@@ -1 +1 @@
1
- import{i as selectResourceStepSearchText,g as actions,S as SHARED_TEXT,j as selectActiveIndex,k as selectActiveResource,l as selectIsFiltersOpen,m as selectIsSelectedViewActive,E as EResourceDropdownID,e as selectIsEditMode,n as selectExistingPackageId,r as resourceTypes,o as getResourceTypeByDropdownIndex,q as getResourceNamespace,t as namespace,u as selectSelectedResources,v as ESelectedResourceType,w as fails$g,x as global$h,y as functionCall,z as functionUncurryThis,A as shared$3,_ as _export,B as wellKnownSymbol$g,C as dataCenterFilePickerPanelID,D as selectApplicationFilters,F as selectSchemaFilters,G as getTdoPickerPanelConfigs,H as EApplicationFilterType,I as EApplicationStatus,J as ESchemaFilterType,K as ESchemaStatus,L as functionUncurryThisClause,M as defineBuiltIn$6,N as createNonEnumerableProperty$4,O as anObject$c,Q as isNullOrUndefined$4,R as requireObjectCoercible$3,T as toString$2,U as getMethod$3,V as regexpFlags$1,W as objectCreate,X as internalState,Y as isCallable$l,Z as classofRaw$2}from"./js-core.esm87.js";import"./js-core.esm119.js";import{bd as injectIntl,r as react,Z as useSelector,j as jsxRuntime,an as CircularProgress,aH as betaFeaturesSelector,ao as Box,dJ as selectIsFullscreenEnabled,aq as unmountPanel,ar as mountPanel}from"./js-core.esm.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm117.js";import{p as debounce_1,d as Tooltip,T as TextField,j as InputAdornment,K as Search,I as IconButton,aF as Clear,l as Stack,ai as ExpandLess,aj as ExpandMore,t as tableInfiniteScroll}from"./js-core.esm6.js";import{S as SimpleFilter}from"./js-core.esm14.js";import{m as makeStyles,T as Typography,S as Select,U as MenuItem,h as Button,ae as Grid,k as FormattedMessage}from"./js-core.esm5.js";import"./js-core.esm13.js";import"./js-core.esm9.js";import"./js-core.esm85.js";import"./js-core.esm59.js";import{A as Add}from"./js-core.esm72.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm83.js";import"./js-core.esm36.js";import"./js-core.esm3.js";import"./js-core.esm4.js";import"./js-core.esm28.js";import"./js-core.esm55.js";import"./js-core.esm45.js";import"./js-core.esm49.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm2.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm17.js";import"./js-core.esm51.js";import"./js-core.esm54.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm53.js";import"./js-core.esm52.js";const selectActiveTDOs=e=>e[namespace].tdos.activeTDOs,{TableInfiniteScroll}=tableInfiniteScroll["jsx"],Container=({children:e,resourceType:s})=>jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"column",flexGrow:"1"},{children:[jsxRuntime.exports.jsx(TableHeader,{resourceType:s}),jsxRuntime.exports.jsx("div",Object.assign({style:{flexGrow:1}},{children:e}))]})),ResourcesTable=react.exports.forwardRef(({resourceType:s,showSelectedResources:e},t)=>{const r=useDispatch();var a=s.card,n=useSelector(s.hasMoreSelector),i=useSelector(s.offsetSelector),c=useSelector(s.itemSelector).map(e=>Object.assign(Object.assign({},e),{resourceType:s.resourceType})),o=useSelector(s.loadingStatusSelector),l=()=>r(s.fetchMore()),p=useSelector(selectSelectedResources).map(e=>Object.assign(Object.assign({},e),{resourceType:s.resourceType})).filter(e=>e.type===s.resourceType);return e?jsxRuntime.exports.jsx(Container,Object.assign({resourceType:s},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:0,hasMore:!1,fetchMore:l,fetchOnMount:!1,items:p.map(e=>Object.assign(Object.assign({},e.item),{resourceType:e.resourceType})),itemHeight:60,isLoading:!1,error:"failure"===o,TableRowComponent:a,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)})):jsxRuntime.exports.jsx(Container,Object.assign({resourceType:s},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:i,hasMore:n,fetchMore:l,fetchOnMount:0===c.length,items:c,itemHeight:60,isLoading:"pending"===o,error:"failure"===o,TableRowComponent:a,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)}))}),TableHeader=({resourceType:e})=>{return jsxRuntime.exports.jsx(Grid,Object.assign({container:!0},{children:(()=>{switch(e.resourceType){case ESelectedResourceType.TDO:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:5,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.fileType()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.actions()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.manage()}))}))]});case ESelectedResourceType.Engine:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))}))]});case ESelectedResourceType.FlowTemplate:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.author()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.date()}))}))]});case ESelectedResourceType.Node:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.author()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]});case ESelectedResourceType.Application:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))}))]});case ESelectedResourceType.Package:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:5,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.primary()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]});default:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]})}})()}))},ApplicationStatusFilter=()=>{const s=useDispatch();var e=(null==(e=useSelector(selectApplicationFilters).find(e=>e.type===EApplicationFilterType.Status))?void 0:e.values)||[],t=Object.values(EApplicationStatus).map(e=>({value:e,label:e})),r=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.application-package.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),a=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.application-package-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.application-package-status-filter",filterLabel:r,clearButtonLabel:a,items:t,selectedValues:e,onChange:e=>{s(actions.applications.setFilter({type:EApplicationFilterType.Status,values:e}))},isMultiselect:!1})},FilterButtons=({onClearAll:e})=>{var s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.engine-package.clear-all.label",defaultMessage:"Clear All",description:"Clear All label"});return jsxRuntime.exports.jsx(Box,Object.assign({sx:{pt:"14px",display:"flex"}},{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"os-resource-center-package-manager-clear-filters-btn",color:"primary",variant:"outlined",onClick:e},{children:s}))}))},ApplicationFilters=()=>{const e=useDispatch();var s=useSelector(selectApplicationFilters);react.exports.useEffect(()=>{e(actions.applications.resetList(null)),e(actions.applications.readStart(null))},[s]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(ApplicationStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onClearAll:()=>{e(actions.applications.clearFilters(null))}})]})},SchemaPackageStatusFilter=()=>{const s=useDispatch();var e=(null==(e=useSelector(selectSchemaFilters).find(e=>e.type===ESchemaFilterType.Status))?void 0:e.values)||[],t=Object.values(ESchemaStatus).map(e=>({value:e,label:e})),r=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.schema.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),a=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.schema-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.schema-status-filter",filterLabel:r,clearButtonLabel:a,items:t,selectedValues:e,onChange:e=>{s(actions.schemas.setFilter({type:ESchemaFilterType.Status,values:e}))},isMultiselect:!1})},SchemaFilters=()=>{const e=useDispatch();var s=useSelector(selectSchemaFilters);react.exports.useEffect(()=>{e(actions.schemas.resetList(null)),e(actions.schemas.readStart(null))},[s]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SchemaPackageStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onClearAll:()=>{e(actions.schemas.clearFilters(null))}})]})},ResourceStepFilters=({isVisible:e=!1,resourceTypeSelected:s=ESelectedResourceType.EnginePackage})=>e?jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginLeft:"-30px",width:"calc(100% + 60px)",p:"10px 30px 10px",background:"#FAFAFA",marginBottom:"20px"}},{children:[s===ESelectedResourceType.Application&&jsxRuntime.exports.jsx(ApplicationFilters,{}),s===ESelectedResourceType.Schema&&jsxRuntime.exports.jsx(SchemaFilters,{})]})):null;var fails$3=fails$g,global$2=global$h,$RegExp$2=global$h.RegExp,UNSUPPORTED_Y$1=fails$3(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$1||fails$3(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$1||fails$3(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$1},fails$2=fails$g,global$1=global$h,$RegExp$1=global$h.RegExp,regexpUnsupportedDotAll=fails$2(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),fails$1=fails$g,global=global$h,$RegExp=global$h.RegExp,regexpUnsupportedNcg=fails$1(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$2=functionCall,uncurryThis$1=functionUncurryThis,toString$1=toString$2,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=shared$3.exports,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt=uncurryThis$1("".charAt),indexOf=uncurryThis$1("".indexOf),replace=uncurryThis$1("".replace),stringSlice=uncurryThis$1("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,s=/b*/g;return call$2(nativeExec,e,"a"),call$2(nativeExec,s,"a"),0!==e.lastIndex||0!==s.lastIndex}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$2=patchedExec=PATCH?function(e){var s,t,r,a,n,i,c=this,o=getInternalState(c),e=toString$1(e),l=o.raw;if(l)return l.lastIndex=c.lastIndex,x=call$2(patchedExec,l,e),c.lastIndex=l.lastIndex,x;var p=o.groups,l=UNSUPPORTED_Y&&c.sticky,x=call$2(regexpFlags,c),o=c.source,u=0,d=e;if(l&&(x=replace(x,"y",""),-1===indexOf(x,"g")&&(x+="g"),d=stringSlice(e,c.lastIndex),0<c.lastIndex&&(!c.multiline||c.multiline&&"\n"!==charAt(e,c.lastIndex-1))&&(o="(?: "+o+")",d=" "+d,u++),s=new RegExp("^(?:"+o+")",x)),NPCG_INCLUDED&&(s=new RegExp("^"+o+"$(?!\\s)",x)),UPDATES_LAST_INDEX_WRONG&&(t=c.lastIndex),r=call$2(nativeExec,l?s:c,d),l?r?(r.input=stringSlice(r.input,u),r[0]=stringSlice(r[0],u),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),NPCG_INCLUDED&&r&&1<r.length&&call$2(nativeReplace,r[0],s,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)}),r&&p)for(r.groups=n=create(null),a=0;a<p.length;a++)n[(i=p[a])[0]]=r[i[1]];return r}:patchedExec,$=_export,exec=regexpExec$2,uncurryThis=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec:exec}),functionUncurryThisClause),defineBuiltIn=defineBuiltIn$6,regexpExec$1=regexpExec$2,fails=fails$g,wellKnownSymbol=wellKnownSymbol$g,createNonEnumerableProperty=createNonEnumerableProperty$4,SPECIES=wellKnownSymbol("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(t,e,s,r){var i,a=wellKnownSymbol(t),c=!fails(function(){var e={};return e[a]=function(){return 7},7!=""[t](e)}),n=c&&!fails(function(){var e=!1,s=/a/;return"split"===t&&((s={constructor:{}}).constructor[SPECIES]=function(){return s},s.flags="",s[a]=/./[a]),s.exec=function(){return e=!0,null},s[a](""),!e});c&&n&&!s||(i=uncurryThis(/./[a]),n=e(a,""[t],function(e,s,t,r,a){var e=uncurryThis(e),n=s.exec;return n===regexpExec$1||n===RegExpPrototype.exec?c&&!a?{done:!0,value:i(s,t,r)}:{done:!0,value:e(t,s,r)}:{done:!1}}),defineBuiltIn(String.prototype,t,n[0]),defineBuiltIn(RegExpPrototype,a,n[1])),r&&createNonEnumerableProperty(RegExpPrototype[a],"sham",!0)},sameValue$1=Object.is||function(e,s){return e===s?0!==e||1/e==1/s:e!=e&&s!=s},call$1=functionCall,anObject$1=anObject$c,isCallable=isCallable$l,classof=classofRaw$2,regexpExec=regexpExec$2,$TypeError=TypeError,regexpExecAbstract=function(e,s){var t=e.exec;if(isCallable(t))return null!==(t=call$1(t,e,s))&&anObject$1(t),t;if("RegExp"===classof(e))return call$1(regexpExec,e,s);throw $TypeError("RegExp#exec called on incompatible receiver")},call=functionCall,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject=anObject$c,isNullOrUndefined=isNullOrUndefined$4,requireObjectCoercible=requireObjectCoercible$3,sameValue=sameValue$1,toString=toString$2,getMethod=getMethod$3,regExpExec=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("search",function(r,a,n){return[function(e){var s=requireObjectCoercible(this),t=isNullOrUndefined(e)?void 0:getMethod(e,r);return t?call(t,e,s):new RegExp(e)[r](toString(s))},function(e){var s=anObject(this),e=toString(e),t=n(a,s,e);return t.done?t.value:(t=s.lastIndex,sameValue(t,0)||(s.lastIndex=0),e=regExpExec(s,e),sameValue(s.lastIndex,t)||(s.lastIndex=t),null===e?-1:e.index)}]});const FiltersButton=({isAvailable:e})=>{const s=useDispatch(),t=useSelector(selectIsFiltersOpen);return react.exports.useEffect(()=>{e||s(actions.resourcesStep.setIsFiltersOpen(!1))},[e]),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e?"":SHARED_TEXT.resourcesStep.search.filtersNotAvailable()},{children:jsxRuntime.exports.jsx("span",Object.assign({style:{display:"flex"}},{children:jsxRuntime.exports.jsxs(Button,Object.assign({"data-testid":"rc-pm-resources-step-toggle-filters-btn",disabled:!e,variant:"text",color:"primary",onClick:()=>{s(actions.resourcesStep.setIsFiltersOpen(!t))}},{children:[SHARED_TEXT.resourcesStep.search.showFilters(),t?jsxRuntime.exports.jsx(ExpandLess,{sx:{marginLeft:"10px"}}):jsxRuntime.exports.jsx(ExpandMore,{sx:{marginLeft:"10px"}})]}))}))}))},SelectViewButton=({showSelected:e,onClick:s})=>{const t=useSelector(selectActiveResource);var r=resourceTypes.find(e=>e.id===t)||resourceTypes[0];return t===EResourceDropdownID.tdos?null:jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"rc-pm-resources-step-show-selected-btn",variant:"text",color:"primary",onClick:s},{children:e?SHARED_TEXT.resourcesStep.showAllToggle(r.dropdownLabel):SHARED_TEXT.resourcesStep.showSelectedToggle(r.dropdownLabel)}))},useStyles=makeStyles()(e=>({searchInput:{width:"400px",borderRadius:"100px","&.is-visible":{width:"400px",opacity:1},"&:focus":{outline:"none",boxShadow:"0 -1px 1px rgba(255, 255, 255, 0.25), 0 1px 5px rgba(0, 0, 0, 0.15)"}},searchContainer:{display:"flex"}})),SearchInput=injectIntl(({intl:e,onChange:s,testId:t,isAvailable:r})=>{const a=useDispatch();var n=useStyles()["classes"];const[i,c]=react.exports.useState(!1);var o=useSelector(selectResourceStepSearchText);const l=react.exports.useCallback(debounce_1(e=>{s&&(s(e),c(!1))},1e3),[s]);var p=react.exports.useCallback(e=>{e=e.target.value;a(actions.resourcesStep.setSearchValue(e)),l(e),c(!0)},[l]);return jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r?"":"Search is not available yet for this Resource."},{children:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(TextField,{disabled:!r,"data-testid":"rc-pm-resources-step-search-input",sx:{"& fieldset":{borderRadius:"100px"},background:r?"":"#f7f7f7"},"data-test":t,onClick:e=>e.stopPropagation(),className:""+n.searchInput,onChange:p,value:o,placeholder:e.formatMessage({id:"rc.package-manager.resources.search-placeholder",defaultMessage:[{type:0,value:"Search by name"}]}),InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(Search,{})})),endAdornment:jsxRuntime.exports.jsxs(InputAdornment,Object.assign({position:"end"},{children:[i&&jsxRuntime.exports.jsx(CircularProgress,{size:20,thickness:5}),!i&&o&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.resourcesStep.search.clearSearch()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{s(""),a(actions.resourcesStep.setSearchValue("")),c(!1)}},{children:jsxRuntime.exports.jsx(Clear,{})}))}))]}))}})})}))}),ADD_FILES_BTN_ID="rc-package-manager-wizard-tdo-add-files-btn",AddFilesBtn=()=>{const s=useDispatch(),t=useSelector(selectIsFullscreenEnabled),r=react.exports.useCallback(e=>{s(unmountPanel(dataCenterFilePickerPanelID)),s(actions.tdos.addTDOs(e)),e.forEach(e=>{s(actions.resourcesStep.selectResource({type:ESelectedResourceType.TDO,id:null==e?void 0:e.id,name:(null==e?void 0:e.name)||"--",version:(null==e?void 0:e.fileType)||"--",item:e}))})},[s,unmountPanel,actions]);return jsxRuntime.exports.jsx(Button,Object.assign({id:ADD_FILES_BTN_ID,startIcon:jsxRuntime.exports.jsx(Add,{}),variant:"contained",onClick:function(){var e=getTdoPickerPanelConfigs(r,t);s(mountPanel(Object.assign({},e)))},"data-testid":ADD_FILES_BTN_ID},{children:SHARED_TEXT.resourceTypes.tdo.addFilesButton()}))},ResourcesStep=()=>{const a=react.exports.useRef(null),n=useDispatch();var e=useSelector(selectActiveIndex);const s=useSelector(selectActiveResource);var t=useSelector(selectIsFiltersOpen);const r=useSelector(selectIsSelectedViewActive);var i=s===EResourceDropdownID.tdos;const c=0!==useSelector(selectActiveTDOs).length,o=useSelector(betaFeaturesSelector),l=useSelector(selectIsEditMode),p=useSelector(selectExistingPackageId);return react.exports.useEffect(()=>{x(s,"")},[s]),react.exports.useEffect(()=>{p&&l&&n(actions.resourcesStep.setIsSelectedViewActive(!1))},[p,l]),jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"column",flexGrow:"1"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"rc-pm-resources-step-description",variant:"subtitle1",padding:e=>e.spacing(3,0,3,0)},{children:SHARED_TEXT.resourcesStep.description})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:5,sx:{margin:e=>e.spacing(3,0,3,0)}},{children:[jsxRuntime.exports.jsx(Select,Object.assign({id:"resource-cetner-package-manager-resource-type","data-testid":"rc-pm-resources-step-resource-type",value:e,onChange:e=>{var s,t=Number(e.target.value);n(actions.resourcesStep.setActiveIndex(t));for(const r of resourceTypes)t===r.dropdownIndex&&(n(actions.resourcesStep.setActiveResource(r.id)),null!=(s=a.current)&&s.scrollTo(0),r.id===EResourceDropdownID.tdos)&&(c||setTimeout(()=>{var e;try{null!=(e=document.querySelector("#"+ADD_FILES_BTN_ID))&&e.click()}catch(e){}},300))},sx:{width:"300px"}},{children:resourceTypes.sort((e,s)=>e.dropdownIndex-s.dropdownIndex).filter(e=>!e.isBehindBetaFlag||o).map((e,s)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:s,"data-testid":"rc-pm-resource-type-option-"+s},{children:e.dropdownLabel}),"resource-center-package-manager-resource-type-"+s))})),jsxRuntime.exports.jsx(SearchInput,{isAvailable:getResourceTypeByDropdownIndex(e).isSearchAvailable,onChange:e=>{x(s,e),null!=(e=a.current)&&e.scrollTo(0)},testId:"package-manager-search-resources-input"}),jsxRuntime.exports.jsx(FiltersButton,{isAvailable:getResourceTypeByDropdownIndex(e).isFilterAvailable,"data-testid":"rc-pm-resources-step-toggle-filters-btn"})]})),jsxRuntime.exports.jsx(ResourceStepFilters,{resourceTypeSelected:getResourceTypeByDropdownIndex(e).resourceType,isVisible:t}),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:5,sx:{margin:e=>e.spacing(3,0,3,0)}},{children:[jsxRuntime.exports.jsx(SelectViewButton,{showSelected:r,onClick:()=>{var e;n(actions.resourcesStep.setIsSelectedViewActive(!r)),r||x(s,""),null!=(e=a.current)&&e.scrollTo(0)}}),i&&jsxRuntime.exports.jsx(AddFilesBtn,{})]})),jsxRuntime.exports.jsx(ResourcesTable,{resourceType:getResourceTypeByDropdownIndex(e),ref:a,showSelectedResources:r}),jsxRuntime.exports.jsx(Box,Object.assign({height:"70px"},{children:jsxRuntime.exports.jsx(PanelControls,{invalidFields:!1,disableNext:!1,disableBack:!1,nextButtonType:ENextButtonType.NEXT})}))]}));function x(e,s){var t;for(const r of resourceTypes){if(e===r.id&&e===EResourceDropdownID.flows)return;e===r.id&&e!==EResourceDropdownID.tdos&&(n(null==(t=actions[getResourceNamespace(r.id)])?void 0:t.setSearchValue(s)),n(actions[getResourceNamespace(r.id)].resetList(null)),n(actions[getResourceNamespace(r.id)].readStart(null)))}}};export{ResourcesStep as default};
1
+ import{i as selectResourceStepSearchText,g as actions,S as SHARED_TEXT,j as selectActiveIndex,k as selectActiveResource,l as selectIsFiltersOpen,m as selectIsSelectedViewActive,E as EResourceDropdownID,e as selectIsEditMode,n as selectExistingPackageId,r as resourceTypes,o as getResourceTypeByDropdownIndex,q as getResourceNamespace,t as namespace,u as selectSelectedResources,v as ESelectedResourceType,w as fails$g,x as global$h,y as functionCall,z as functionUncurryThis,A as shared$3,_ as _export,B as wellKnownSymbol$g,C as dataCenterFilePickerPanelID,D as selectApplicationFilters,F as selectSchemaFilters,G as getTdoPickerPanelConfigs,H as EApplicationFilterType,I as EApplicationStatus,J as ESchemaFilterType,K as ESchemaStatus,L as functionUncurryThisClause,M as defineBuiltIn$6,N as createNonEnumerableProperty$4,O as anObject$c,Q as isNullOrUndefined$4,R as requireObjectCoercible$3,T as toString$2,U as getMethod$3,V as regexpFlags$1,W as objectCreate,X as internalState,Y as isCallable$l,Z as classofRaw$2}from"./js-core.esm87.js";import"./js-core.esm119.js";import{bd as injectIntl,r as react,Z as useSelector,j as jsxRuntime,an as CircularProgress,aH as betaFeaturesSelector,ao as Box,dJ as selectIsFullscreenEnabled,aq as unmountPanel,ar as mountPanel}from"./js-core.esm.js";import{P as PanelControls,E as ENextButtonType}from"./js-core.esm117.js";import{p as debounce_1,d as Tooltip,T as TextField,j as InputAdornment,K as Search,I as IconButton,aG as Clear,l as Stack,ai as ExpandLess,aj as ExpandMore,t as tableInfiniteScroll}from"./js-core.esm6.js";import{S as SimpleFilter}from"./js-core.esm14.js";import{m as makeStyles,T as Typography,S as Select,U as MenuItem,h as Button,ae as Grid,k as FormattedMessage}from"./js-core.esm5.js";import"./js-core.esm13.js";import"./js-core.esm9.js";import"./js-core.esm85.js";import"./js-core.esm59.js";import{A as Add}from"./js-core.esm72.js";import{u as useDispatch}from"./js-core.esm7.js";import"./js-core.esm83.js";import"./js-core.esm36.js";import"./js-core.esm3.js";import"./js-core.esm4.js";import"./js-core.esm28.js";import"./js-core.esm55.js";import"./js-core.esm45.js";import"./js-core.esm49.js";import"./js-core.esm50.js";import"./js-core.esm56.js";import"./js-core.esm2.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm17.js";import"./js-core.esm51.js";import"./js-core.esm54.js";import"./js-core.esm26.js";import"./js-core.esm25.js";import"./js-core.esm53.js";import"./js-core.esm52.js";const selectActiveTDOs=e=>e[namespace].tdos.activeTDOs,{TableInfiniteScroll}=tableInfiniteScroll["jsx"],Container=({children:e,resourceType:s})=>jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"column",flexGrow:"1"},{children:[jsxRuntime.exports.jsx(TableHeader,{resourceType:s}),jsxRuntime.exports.jsx("div",Object.assign({style:{flexGrow:1}},{children:e}))]})),ResourcesTable=react.exports.forwardRef(({resourceType:s,showSelectedResources:e},t)=>{const r=useDispatch();var a=s.card,n=useSelector(s.hasMoreSelector),i=useSelector(s.offsetSelector),c=useSelector(s.itemSelector).map(e=>Object.assign(Object.assign({},e),{resourceType:s.resourceType})),o=useSelector(s.loadingStatusSelector),l=()=>r(s.fetchMore()),p=useSelector(selectSelectedResources).map(e=>Object.assign(Object.assign({},e),{resourceType:s.resourceType})).filter(e=>e.type===s.resourceType);return e?jsxRuntime.exports.jsx(Container,Object.assign({resourceType:s},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:0,hasMore:!1,fetchMore:l,fetchOnMount:!1,items:p.map(e=>Object.assign(Object.assign({},e.item),{resourceType:e.resourceType})),itemHeight:60,isLoading:!1,error:"failure"===o,TableRowComponent:a,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)})):jsxRuntime.exports.jsx(Container,Object.assign({resourceType:s},{children:jsxRuntime.exports.jsx(TableInfiniteScroll,{offset:i,hasMore:n,fetchMore:l,fetchOnMount:0===c.length,items:c,itemHeight:60,isLoading:"pending"===o,error:"failure"===o,TableRowComponent:a,MessageEmptyState:SHARED_TEXT.resourcesStep.table.emptyState(s.dropdownLabel),MessageErrorState:SHARED_TEXT.resourcesStep.table.errorState(s.dropdownLabel),listRef:t},s.id)}))}),TableHeader=({resourceType:e})=>{return jsxRuntime.exports.jsx(Grid,Object.assign({container:!0},{children:(()=>{switch(e.resourceType){case ESelectedResourceType.TDO:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:5,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.fileType()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.actions()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourceTypes.tdo.manage()}))}))]});case ESelectedResourceType.Engine:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))}))]});case ESelectedResourceType.FlowTemplate:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.author()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.date()}))}))]});case ESelectedResourceType.Node:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.author()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]});case ESelectedResourceType.Application:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:4,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))}))]});case ESelectedResourceType.Package:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:5,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.primary()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]});default:return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,{variant:"caption"})})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:7,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsxs(Typography,Object.assign({variant:"caption"},{children:[e.confirmationLabel," ",SHARED_TEXT.resourcesStep.table.name()]}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.status()}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0,alignItems:"center"},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:SHARED_TEXT.resourcesStep.table.version()}))}))]})}})()}))},ApplicationStatusFilter=()=>{const s=useDispatch();var e=(null==(e=useSelector(selectApplicationFilters).find(e=>e.type===EApplicationFilterType.Status))?void 0:e.values)||[],t=Object.values(EApplicationStatus).map(e=>({value:e,label:e})),r=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.application-package.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),a=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.application-package-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.application-package-status-filter",filterLabel:r,clearButtonLabel:a,items:t,selectedValues:e,onChange:e=>{s(actions.applications.setFilter({type:EApplicationFilterType.Status,values:e}))},isMultiselect:!1})},FilterButtons=({onClearAll:e})=>{var s=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.engine-package.clear-all.label",defaultMessage:"Clear All",description:"Clear All label"});return jsxRuntime.exports.jsx(Box,Object.assign({sx:{pt:"14px",display:"flex"}},{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"os-resource-center-package-manager-clear-filters-btn",color:"primary",variant:"outlined",onClick:e},{children:s}))}))},ApplicationFilters=()=>{const e=useDispatch();var s=useSelector(selectApplicationFilters);react.exports.useEffect(()=>{e(actions.applications.resetList(null)),e(actions.applications.readStart(null))},[s]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(ApplicationStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onClearAll:()=>{e(actions.applications.clearFilters(null))}})]})},SchemaPackageStatusFilter=()=>{const s=useDispatch();var e=(null==(e=useSelector(selectSchemaFilters).find(e=>e.type===ESchemaFilterType.Status))?void 0:e.values)||[],t=Object.values(ESchemaStatus).map(e=>({value:e,label:e})),r=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.schema.status-filter.label",defaultMessage:"Status",description:"Status filter label"}),a=jsxRuntime.exports.jsx(FormattedMessage,{id:"os-resource-center-package-manager.schema-filter.clear-button.label",defaultMessage:"Clear",description:"Label for the button to clear the filter"});return jsxRuntime.exports.jsx(SimpleFilter,{id:"os-resource-center-package-manager.schema-status-filter",filterLabel:r,clearButtonLabel:a,items:t,selectedValues:e,onChange:e=>{s(actions.schemas.setFilter({type:ESchemaFilterType.Status,values:e}))},isMultiselect:!1})},SchemaFilters=()=>{const e=useDispatch();var s=useSelector(selectSchemaFilters);react.exports.useEffect(()=>{e(actions.schemas.resetList(null)),e(actions.schemas.readStart(null))},[s]);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(SchemaPackageStatusFilter,{}),jsxRuntime.exports.jsx(FilterButtons,{onClearAll:()=>{e(actions.schemas.clearFilters(null))}})]})},ResourceStepFilters=({isVisible:e=!1,resourceTypeSelected:s=ESelectedResourceType.EnginePackage})=>e?jsxRuntime.exports.jsxs(Box,Object.assign({sx:{marginLeft:"-30px",width:"calc(100% + 60px)",p:"10px 30px 10px",background:"#FAFAFA",marginBottom:"20px"}},{children:[s===ESelectedResourceType.Application&&jsxRuntime.exports.jsx(ApplicationFilters,{}),s===ESelectedResourceType.Schema&&jsxRuntime.exports.jsx(SchemaFilters,{})]})):null;var fails$3=fails$g,global$2=global$h,$RegExp$2=global$h.RegExp,UNSUPPORTED_Y$1=fails$3(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$1||fails$3(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$1||fails$3(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$1},fails$2=fails$g,global$1=global$h,$RegExp$1=global$h.RegExp,regexpUnsupportedDotAll=fails$2(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),fails$1=fails$g,global=global$h,$RegExp=global$h.RegExp,regexpUnsupportedNcg=fails$1(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$2=functionCall,uncurryThis$1=functionUncurryThis,toString$1=toString$2,regexpFlags=regexpFlags$1,stickyHelpers=regexpStickyHelpers,shared=shared$3.exports,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt=uncurryThis$1("".charAt),indexOf=uncurryThis$1("".indexOf),replace=uncurryThis$1("".replace),stringSlice=uncurryThis$1("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,s=/b*/g;return call$2(nativeExec,e,"a"),call$2(nativeExec,s,"a"),0!==e.lastIndex||0!==s.lastIndex}(),UNSUPPORTED_Y=stickyHelpers.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$2=patchedExec=PATCH?function(e){var s,t,r,a,n,i,c=this,o=getInternalState(c),e=toString$1(e),l=o.raw;if(l)return l.lastIndex=c.lastIndex,x=call$2(patchedExec,l,e),c.lastIndex=l.lastIndex,x;var p=o.groups,l=UNSUPPORTED_Y&&c.sticky,x=call$2(regexpFlags,c),o=c.source,u=0,d=e;if(l&&(x=replace(x,"y",""),-1===indexOf(x,"g")&&(x+="g"),d=stringSlice(e,c.lastIndex),0<c.lastIndex&&(!c.multiline||c.multiline&&"\n"!==charAt(e,c.lastIndex-1))&&(o="(?: "+o+")",d=" "+d,u++),s=new RegExp("^(?:"+o+")",x)),NPCG_INCLUDED&&(s=new RegExp("^"+o+"$(?!\\s)",x)),UPDATES_LAST_INDEX_WRONG&&(t=c.lastIndex),r=call$2(nativeExec,l?s:c,d),l?r?(r.input=stringSlice(r.input,u),r[0]=stringSlice(r[0],u),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),NPCG_INCLUDED&&r&&1<r.length&&call$2(nativeReplace,r[0],s,function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)}),r&&p)for(r.groups=n=create(null),a=0;a<p.length;a++)n[(i=p[a])[0]]=r[i[1]];return r}:patchedExec,$=_export,exec=regexpExec$2,uncurryThis=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec},{exec:exec}),functionUncurryThisClause),defineBuiltIn=defineBuiltIn$6,regexpExec$1=regexpExec$2,fails=fails$g,wellKnownSymbol=wellKnownSymbol$g,createNonEnumerableProperty=createNonEnumerableProperty$4,SPECIES=wellKnownSymbol("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(t,e,s,r){var i,a=wellKnownSymbol(t),c=!fails(function(){var e={};return e[a]=function(){return 7},7!=""[t](e)}),n=c&&!fails(function(){var e=!1,s=/a/;return"split"===t&&((s={constructor:{}}).constructor[SPECIES]=function(){return s},s.flags="",s[a]=/./[a]),s.exec=function(){return e=!0,null},s[a](""),!e});c&&n&&!s||(i=uncurryThis(/./[a]),n=e(a,""[t],function(e,s,t,r,a){var e=uncurryThis(e),n=s.exec;return n===regexpExec$1||n===RegExpPrototype.exec?c&&!a?{done:!0,value:i(s,t,r)}:{done:!0,value:e(t,s,r)}:{done:!1}}),defineBuiltIn(String.prototype,t,n[0]),defineBuiltIn(RegExpPrototype,a,n[1])),r&&createNonEnumerableProperty(RegExpPrototype[a],"sham",!0)},sameValue$1=Object.is||function(e,s){return e===s?0!==e||1/e==1/s:e!=e&&s!=s},call$1=functionCall,anObject$1=anObject$c,isCallable=isCallable$l,classof=classofRaw$2,regexpExec=regexpExec$2,$TypeError=TypeError,regexpExecAbstract=function(e,s){var t=e.exec;if(isCallable(t))return null!==(t=call$1(t,e,s))&&anObject$1(t),t;if("RegExp"===classof(e))return call$1(regexpExec,e,s);throw $TypeError("RegExp#exec called on incompatible receiver")},call=functionCall,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,anObject=anObject$c,isNullOrUndefined=isNullOrUndefined$4,requireObjectCoercible=requireObjectCoercible$3,sameValue=sameValue$1,toString=toString$2,getMethod=getMethod$3,regExpExec=regexpExecAbstract;fixRegexpWellKnownSymbolLogic("search",function(r,a,n){return[function(e){var s=requireObjectCoercible(this),t=isNullOrUndefined(e)?void 0:getMethod(e,r);return t?call(t,e,s):new RegExp(e)[r](toString(s))},function(e){var s=anObject(this),e=toString(e),t=n(a,s,e);return t.done?t.value:(t=s.lastIndex,sameValue(t,0)||(s.lastIndex=0),e=regExpExec(s,e),sameValue(s.lastIndex,t)||(s.lastIndex=t),null===e?-1:e.index)}]});const FiltersButton=({isAvailable:e})=>{const s=useDispatch(),t=useSelector(selectIsFiltersOpen);return react.exports.useEffect(()=>{e||s(actions.resourcesStep.setIsFiltersOpen(!1))},[e]),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e?"":SHARED_TEXT.resourcesStep.search.filtersNotAvailable()},{children:jsxRuntime.exports.jsx("span",Object.assign({style:{display:"flex"}},{children:jsxRuntime.exports.jsxs(Button,Object.assign({"data-testid":"rc-pm-resources-step-toggle-filters-btn",disabled:!e,variant:"text",color:"primary",onClick:()=>{s(actions.resourcesStep.setIsFiltersOpen(!t))}},{children:[SHARED_TEXT.resourcesStep.search.showFilters(),t?jsxRuntime.exports.jsx(ExpandLess,{sx:{marginLeft:"10px"}}):jsxRuntime.exports.jsx(ExpandMore,{sx:{marginLeft:"10px"}})]}))}))}))},SelectViewButton=({showSelected:e,onClick:s})=>{const t=useSelector(selectActiveResource);var r=resourceTypes.find(e=>e.id===t)||resourceTypes[0];return t===EResourceDropdownID.tdos?null:jsxRuntime.exports.jsx(Button,Object.assign({"data-testid":"rc-pm-resources-step-show-selected-btn",variant:"text",color:"primary",onClick:s},{children:e?SHARED_TEXT.resourcesStep.showAllToggle(r.dropdownLabel):SHARED_TEXT.resourcesStep.showSelectedToggle(r.dropdownLabel)}))},useStyles=makeStyles()(e=>({searchInput:{width:"400px",borderRadius:"100px","&.is-visible":{width:"400px",opacity:1},"&:focus":{outline:"none",boxShadow:"0 -1px 1px rgba(255, 255, 255, 0.25), 0 1px 5px rgba(0, 0, 0, 0.15)"}},searchContainer:{display:"flex"}})),SearchInput=injectIntl(({intl:e,onChange:s,testId:t,isAvailable:r})=>{const a=useDispatch();var n=useStyles()["classes"];const[i,c]=react.exports.useState(!1);var o=useSelector(selectResourceStepSearchText);const l=react.exports.useCallback(debounce_1(e=>{s&&(s(e),c(!1))},1e3),[s]);var p=react.exports.useCallback(e=>{e=e.target.value;a(actions.resourcesStep.setSearchValue(e)),l(e),c(!0)},[l]);return jsxRuntime.exports.jsx(Tooltip,Object.assign({title:r?"":"Search is not available yet for this Resource."},{children:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(TextField,{disabled:!r,"data-testid":"rc-pm-resources-step-search-input",sx:{"& fieldset":{borderRadius:"100px"},background:r?"":"#f7f7f7"},"data-test":t,onClick:e=>e.stopPropagation(),className:""+n.searchInput,onChange:p,value:o,placeholder:e.formatMessage({id:"rc.package-manager.resources.search-placeholder",defaultMessage:[{type:0,value:"Search by name"}]}),InputProps:{startAdornment:jsxRuntime.exports.jsx(InputAdornment,Object.assign({position:"start"},{children:jsxRuntime.exports.jsx(Search,{})})),endAdornment:jsxRuntime.exports.jsxs(InputAdornment,Object.assign({position:"end"},{children:[i&&jsxRuntime.exports.jsx(CircularProgress,{size:20,thickness:5}),!i&&o&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.resourcesStep.search.clearSearch()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{s(""),a(actions.resourcesStep.setSearchValue("")),c(!1)}},{children:jsxRuntime.exports.jsx(Clear,{})}))}))]}))}})})}))}),ADD_FILES_BTN_ID="rc-package-manager-wizard-tdo-add-files-btn",AddFilesBtn=()=>{const s=useDispatch(),t=useSelector(selectIsFullscreenEnabled),r=react.exports.useCallback(e=>{s(unmountPanel(dataCenterFilePickerPanelID)),s(actions.tdos.addTDOs(e)),e.forEach(e=>{s(actions.resourcesStep.selectResource({type:ESelectedResourceType.TDO,id:null==e?void 0:e.id,name:(null==e?void 0:e.name)||"--",version:(null==e?void 0:e.fileType)||"--",item:e}))})},[s,unmountPanel,actions]);return jsxRuntime.exports.jsx(Button,Object.assign({id:ADD_FILES_BTN_ID,startIcon:jsxRuntime.exports.jsx(Add,{}),variant:"contained",onClick:function(){var e=getTdoPickerPanelConfigs(r,t);s(mountPanel(Object.assign({},e)))},"data-testid":ADD_FILES_BTN_ID},{children:SHARED_TEXT.resourceTypes.tdo.addFilesButton()}))},ResourcesStep=()=>{const a=react.exports.useRef(null),n=useDispatch();var e=useSelector(selectActiveIndex);const s=useSelector(selectActiveResource);var t=useSelector(selectIsFiltersOpen);const r=useSelector(selectIsSelectedViewActive);var i=s===EResourceDropdownID.tdos;const c=0!==useSelector(selectActiveTDOs).length,o=useSelector(betaFeaturesSelector),l=useSelector(selectIsEditMode),p=useSelector(selectExistingPackageId);return react.exports.useEffect(()=>{x(s,"")},[s]),react.exports.useEffect(()=>{p&&l&&n(actions.resourcesStep.setIsSelectedViewActive(!1))},[p,l]),jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"column",flexGrow:"1"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-testid":"rc-pm-resources-step-description",variant:"subtitle1",padding:e=>e.spacing(3,0,3,0)},{children:SHARED_TEXT.resourcesStep.description})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:5,sx:{margin:e=>e.spacing(3,0,3,0)}},{children:[jsxRuntime.exports.jsx(Select,Object.assign({id:"resource-cetner-package-manager-resource-type","data-testid":"rc-pm-resources-step-resource-type",value:e,onChange:e=>{var s,t=Number(e.target.value);n(actions.resourcesStep.setActiveIndex(t));for(const r of resourceTypes)t===r.dropdownIndex&&(n(actions.resourcesStep.setActiveResource(r.id)),null!=(s=a.current)&&s.scrollTo(0),r.id===EResourceDropdownID.tdos)&&(c||setTimeout(()=>{var e;try{null!=(e=document.querySelector("#"+ADD_FILES_BTN_ID))&&e.click()}catch(e){}},300))},sx:{width:"300px"}},{children:resourceTypes.sort((e,s)=>e.dropdownIndex-s.dropdownIndex).filter(e=>!e.isBehindBetaFlag||o).map((e,s)=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:s,"data-testid":"rc-pm-resource-type-option-"+s},{children:e.dropdownLabel}),"resource-center-package-manager-resource-type-"+s))})),jsxRuntime.exports.jsx(SearchInput,{isAvailable:getResourceTypeByDropdownIndex(e).isSearchAvailable,onChange:e=>{x(s,e),null!=(e=a.current)&&e.scrollTo(0)},testId:"package-manager-search-resources-input"}),jsxRuntime.exports.jsx(FiltersButton,{isAvailable:getResourceTypeByDropdownIndex(e).isFilterAvailable,"data-testid":"rc-pm-resources-step-toggle-filters-btn"})]})),jsxRuntime.exports.jsx(ResourceStepFilters,{resourceTypeSelected:getResourceTypeByDropdownIndex(e).resourceType,isVisible:t}),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:5,sx:{margin:e=>e.spacing(3,0,3,0)}},{children:[jsxRuntime.exports.jsx(SelectViewButton,{showSelected:r,onClick:()=>{var e;n(actions.resourcesStep.setIsSelectedViewActive(!r)),r||x(s,""),null!=(e=a.current)&&e.scrollTo(0)}}),i&&jsxRuntime.exports.jsx(AddFilesBtn,{})]})),jsxRuntime.exports.jsx(ResourcesTable,{resourceType:getResourceTypeByDropdownIndex(e),ref:a,showSelectedResources:r}),jsxRuntime.exports.jsx(Box,Object.assign({height:"70px"},{children:jsxRuntime.exports.jsx(PanelControls,{invalidFields:!1,disableNext:!1,disableBack:!1,nextButtonType:ENextButtonType.NEXT})}))]}));function x(e,s){var t;for(const r of resourceTypes){if(e===r.id&&e===EResourceDropdownID.flows)return;e===r.id&&e!==EResourceDropdownID.tdos&&(n(null==(t=actions[getResourceNamespace(r.id)])?void 0:t.setSearchValue(s)),n(actions[getResourceNamespace(r.id)].resetList(null)),n(actions[getResourceNamespace(r.id)].readStart(null)))}}};export{ResourcesStep as default};
Binary file