@rocketspark/domain-checker 1.0.2 → 1.0.3
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/build/141.index.js +2 -2
- package/build/141.index.js.map +1 -1
- package/build/147.index.js +2 -2
- package/build/147.index.js.map +1 -1
- package/build/167.index.js +2 -2
- package/build/167.index.js.map +1 -1
- package/build/17.index.js +2 -2
- package/build/17.index.js.map +1 -1
- package/build/194.index.js +2 -2
- package/build/194.index.js.map +1 -1
- package/build/208.index.js +2 -2
- package/build/208.index.js.map +1 -1
- package/build/237.index.js +2 -2
- package/build/237.index.js.map +1 -1
- package/build/245.index.js +2 -2
- package/build/245.index.js.map +1 -1
- package/build/278.index.js +2 -2
- package/build/278.index.js.map +1 -1
- package/build/386.index.js +2 -2
- package/build/386.index.js.map +1 -1
- package/build/404.index.js +2 -2
- package/build/404.index.js.map +1 -1
- package/build/420.index.js +2 -2
- package/build/420.index.js.map +1 -1
- package/build/514.index.js +2 -2
- package/build/514.index.js.map +1 -1
- package/build/524.index.js +2 -2
- package/build/524.index.js.map +1 -1
- package/build/542.index.js +2 -2
- package/build/542.index.js.map +1 -1
- package/build/551.index.js +2 -2
- package/build/551.index.js.map +1 -1
- package/build/567.index.js +2 -2
- package/build/567.index.js.map +1 -1
- package/build/571.index.js +2 -2
- package/build/571.index.js.map +1 -1
- package/build/572.index.js +2 -2
- package/build/572.index.js.map +1 -1
- package/build/584.index.js +2 -2
- package/build/584.index.js.map +1 -1
- package/build/588.index.js +2 -2
- package/build/588.index.js.map +1 -1
- package/build/598.index.js +2 -2
- package/build/598.index.js.map +1 -1
- package/build/60.index.js +2 -2
- package/build/60.index.js.map +1 -1
- package/build/616.index.js +2 -2
- package/build/616.index.js.map +1 -1
- package/build/631.index.js +2 -2
- package/build/631.index.js.map +1 -1
- package/build/643.index.js +2 -2
- package/build/643.index.js.map +1 -1
- package/build/654.index.js +2 -2
- package/build/654.index.js.map +1 -1
- package/build/66.index.js +2 -2
- package/build/66.index.js.map +1 -1
- package/build/697.index.js +2 -2
- package/build/697.index.js.map +1 -1
- package/build/714.index.js +2 -2
- package/build/714.index.js.map +1 -1
- package/build/717.index.js +13 -0
- package/build/717.index.js.map +1 -0
- package/build/795.index.js +2 -2
- package/build/795.index.js.map +1 -1
- package/build/8.index.js +2 -2
- package/build/8.index.js.map +1 -1
- package/build/808.index.js +2 -2
- package/build/808.index.js.map +1 -1
- package/build/810.index.js +2 -2
- package/build/810.index.js.map +1 -1
- package/build/833.index.js +2 -2
- package/build/833.index.js.map +1 -1
- package/build/835.index.js +2 -2
- package/build/835.index.js.map +1 -1
- package/build/847.index.js +2 -2
- package/build/847.index.js.map +1 -1
- package/build/853.index.js +2 -2
- package/build/853.index.js.map +1 -1
- package/build/871.index.js +2 -2
- package/build/871.index.js.map +1 -1
- package/build/890.index.js +2 -2
- package/build/890.index.js.map +1 -1
- package/build/899.index.js +2 -2
- package/build/899.index.js.map +1 -1
- package/build/938.index.js +2 -2
- package/build/938.index.js.map +1 -1
- package/build/964.index.js +2 -2
- package/build/964.index.js.map +1 -1
- package/build/970.index.js +2 -2
- package/build/970.index.js.map +1 -1
- package/build/984.index.js +13 -0
- package/build/984.index.js.map +1 -0
- package/build/993.index.js +2 -2
- package/build/993.index.js.map +1 -1
- package/build/css/index.css +2 -2
- package/build/css/index.css.map +1 -1
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/build/540.index.js +0 -13
- package/build/540.index.js.map +0 -1
- package/build/861.index.js +0 -13
- package/build/861.index.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
*
|
|
3
|
+
* @rocketspark/domain-checker v1.0.3
|
|
4
|
+
* https://github.com/rocketspark/domain-checker.git
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Lee Reichardt and project contributors.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the no license license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[717],{6717:function(t,e,o){o.r(e),o.d(e,{rs_button:function(){return n},rs_header:function(){return i},rs_loader:function(){return s},rs_subtitle:function(){return a}});var r=o(6919);const n=class{constructor(t){(0,r.r)(this,t),this.color="primary",this.disabled=!1,this.size="default",this.loading=!1}getColorClass(){return`color--${this.color}`}getExpandClass(){return"block"===this.expand?"expand-block":"full"===this.expand?"expand-full":""}setButtonWidth(){this.loading?this.buttonElement.style.width=`${this.buttonElement.offsetWidth}px`:this.buttonElement.style.width=null}render(){const{href:t,rel:e,target:o}=this,n=void 0===this.href?"button":"a",i="a"===n?{href:t,rel:e,target:o}:{};return(0,r.h)(r.H,{key:"c3b642de2a5185a059c3a546cc8f6c48ecaece6d",class:this.getExpandClass(),style:{"flex-grow":this.flexGrow}},(0,r.h)(n,Object.assign({key:"c5754da876be113da788a028db0ff3759c526714",ref:t=>this.buttonElement=t},i,{disabled:this.disabled,class:["button-element",this.loading?"button-element--loading":"",this.getColorClass(),"small"===this.size?"small":"",this.disabled?"disabled":"",void 0!==this.expand?`button-element--${this.expand}`:""].join(" ").trim(),style:{width:"collapse"===this.expand?`${this.width}px`:null}}),this.renderStartIcon(),this.slot(),this.renderEndIcon()))}slot(){return this.el.textContent?this.loading?(0,r.h)("rs-loader",{type:"indeterminate"}):(0,r.h)("span",null,(0,r.h)("slot",null)):null}renderStartIcon(){return void 0!==this.iconStart?(0,r.h)("rs-icon",{size:this.iconSize,color:this.iconColor,class:"icon-start",name:this.iconStart}):null}renderEndIcon(){return void 0!==this.iconEnd?(0,r.h)("rs-icon",{size:this.iconSize,color:this.iconColor,class:"icon-end",name:this.iconEnd}):null}get el(){return(0,r.g)(this)}static get watchers(){return{loading:["setButtonWidth"]}}};n.style=":host{display:inline-block}.button-element span{top:-1px;display:block;position:relative;line-height:1;font-size:16px;font-family:soleil, sans-serif;font-style:normal;font-weight:600;letter-spacing:0.2px;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a.button-element span{top:initial}.button-element{text-decoration:none;padding:12px 25px;min-width:90px;height:42px;cursor:pointer;user-select:none;border:0;border-radius:4px;outline:none;display:inline-flex;box-sizing:border-box;background-size:cover;transition:background 0.25s ease-out, box-shadow 0.25s ease-out;color:var(--rs-color-white);width:100%;white-space:nowrap;justify-content:center;align-items:center;gap:8px}.button-element.small{padding-top:10px;padding-bottom:10px;height:36px}.button-element.small span{font-size:14px}.button-element:active{transition-delay:200ms}:host(.expand-block),:host(.expand-full){display:block}.button-element--collapse{min-width:auto;padding:0;aspect-ratio:1;height:auto}:host(.expand-block) .button-element{display:block;width:100%}:host(.expand-full) .button-element{display:block;width:100%;border-radius:0}.button-element.color--primary{background:var(--rs-color-primary-700)}.button-element.color--primary:hover{background:var(--rs-color-primary)}.button-element.color--primary:active{background:var(--rs-color-primary-300)}.button-element.color--negative{background:var(--rs-color-negative)}.button-element.color--secondary{background:var(--rs-color-secondary)}.button-element.color--secondary:hover{background:var(--rs-color-secondary-700)}.button-element.color--secondary:active{background:var(--rs-color-secondary-300)}.button-element.disabled span{color:var(--rs-color-white);pointer-events:none}.button-element.color--grey-light{color:var(--rs-color-secondary);background:transparent;box-shadow:inset 0 0 0 1px var(--rs-color-select-border)}:host(.expand-block) .button-element.color--grey-light span,:host(.expand-full) .button-element.color--grey-light span{font-weight:normal;color:var(--rs-color-secondary)}.button-element:not(.disabled).color--grey-light:hover{box-shadow:inset 0 0 0 1px var(--rs-color-grey)}.button-element.color--positive{background:var(--rs-color-positive)}.button-element.color--positive:hover{background:var(--rs-color-positive-700)}.button-element.color--positive:active{background:var(--rs-color-positive-300)}.button-element.color--text{color:var(--rs-color-grey);background:transparent}.button-element.color--text:hover{background:var(--rs-color-light)}.button-element.color--text:active{background:var(--rs-color-grey-light)}.button-element.disabled{box-shadow:none;background:var(--rs-color-grey-light);cursor:not-allowed}.button-element.disabled:hover{background:var(--rs-color-grey-light)}";const i=class{constructor(t){(0,r.r)(this,t),this.heading="2",this.color="heading"}render(){const t=`h${this.heading}`;return(0,r.h)(r.H,{key:"730ed31799fa902f1172e11ec61cda07da228da6",style:{color:void 0!==this.color?`var(--rs-color-${this.color})`:""}},(0,r.h)(t,{key:"3519f13751bdd567053216e963792ee7b0f7d665"},(0,r.h)("slot",{key:"cfb2c79fdc3f68e502b530789d3afb0e05b10690"})))}};i.style=":host{display:block;font-family:soleil, sans-serif;font-style:normal;color:var(--rs-color-heading);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5{margin:0;padding:0;line-height:1.2em}h1{font-weight:600;font-size:50px}h2{font-weight:600;font-size:38px}h3{font-weight:600;font-size:26px}h4{font-weight:700;font-size:22px}h5{font-weight:600;font-size:16px}";const s=class{constructor(t){(0,r.r)(this,t),this.type="spinner"}render(){return(0,r.h)(r.H,{key:"9a07d2ab96c0a18996f4ff287412493f0feaf454",class:this.type},"spinner"===this.type?this.spinner():this.indeterminate())}spinner(){return(0,r.h)("div",{class:"loader rs-loader"},"Loading...")}indeterminate(){return(0,r.h)("div",{class:"indeterminate-loader"},(0,r.h)("span",null,(0,r.h)("div",{class:"indeterminate-loader__loading-bar"})))}};s.style=':host{display:block}.loader{margin:0 auto;font-size:10px;position:relative;text-indent:-9999em;border-top:1.1em solid rgb(26 36 40 / 0.2);border-right:1.1em solid rgb(26 36 40 / 0.2);border-bottom:1.1em solid rgb(26 36 40 / 0.2);border-left:1.1em solid #1a2428;transform:translateZ(0);animation:load8 1.1s infinite linear;display:inline-block;vertical-align:middle;transition:opacity 0.3s linear}.loader,.loader::after{border-radius:50%;width:10em;height:10em}@keyframes load8{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host(.indeterminate){width:100%}.indeterminate-loader{cursor:wait;display:flex;align-items:center;border-radius:3px;overflow:hidden;width:100%}.indeterminate-loader>*{width:100%}.indeterminate-loader__loading-bar{position:relative;overflow:hidden;height:5px;border-radius:3px;background-color:rgb(255 255 255 / 0.5);width:100%}.indeterminate-loader__loading-bar::before{position:absolute;top:0;bottom:0;left:0;content:"";animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;border-radius:3px;background-color:rgb(255 255 255 / 0.5);will-change:left, right}.indeterminate-loader__loading-bar::after{position:absolute;top:0;bottom:0;left:0;content:"";animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;animation-delay:1.15s;border-radius:3px;background-color:rgb(255 255 255 / 0.5);will-change:left, right}@keyframes indeterminate{0%{right:100%;left:-35%}60%{right:-90%;left:100%}100%{right:-90%;left:100%}}@keyframes indeterminate-short{0%{right:100%;left:-200%}60%{right:-8%;left:107%}100%{right:-8%;left:107%}}';const a=class{constructor(t){(0,r.r)(this,t),this.subtitle="1",this.color="grey"}render(){return(0,r.h)(r.H,{key:"6909aabaaeef9272ce83f13ed4bf8b594e3dfc83",class:`subtitle__${this.subtitle}`,style:{color:void 0!==this.color?`var(--rs-color-${this.color})`:""}},(0,r.h)("slot",{key:"c4628669381f6daa6d1afd0ddff388936086eb5d"}))}};a.style=":host{display:block;font-family:soleil, sans-serif;font-style:normal;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host(.subtitle__1){font-weight:400;font-size:18px;line-height:1.4em;letter-spacing:0.15px}:host(.subtitle__2){font-weight:300;font-size:12px;line-height:1.2em;letter-spacing:0.5px;text-transform:uppercase}:host(.subtitle__3){font-weight:500;font-size:10px;line-height:1.2em;letter-spacing:0.5px;text-transform:uppercase}"}}]);
|
|
13
|
+
//# sourceMappingURL=717.index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"717.index.js","mappings":";;;;;;;;;;;+QAEA,MAGMA,EAAS,MACX,WAAAC,CAAYC,IACR,IAAAC,GAAiBC,KAAMF,GAEvBE,KAAKC,MAAQ,UAEbD,KAAKE,UAAW,E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GAAE,MAAO,CAAEG,MAAO,yBAA0B,IAAAH,GAAE,OAAQ,MAAM,IAAAA,GAAE,MAAO,CAAEG,MAAO,uCAC1F,GAEJsB,EAASnC,MAlBW,kkDAoBpB,MAGMsC,EAAW,MACb,WAAAnD,CAAYC,IACR,IAAAC,GAAiBC,KAAMF,GAEvBE,KAAKiD,SAAW,IAIhBjD,KAAKC,MAAQ,MACjB,CACA,MAAAY,GACI,OAAQ,IAAAO,GAAE,EAAAC,EAAM,CAAEC,IAAK,2CAA4CC,MAAO,aAAavB,KAAKiD,WAAYvC,MAAO,CACvGT,WAAsBiB,IAAflB,KAAKC,MAAsB,kBAAkBD,KAAKC,SAAW,MACnE,IAAAmB,GAAE,OAAQ,CAAEE,IAAK,6CAC9B,GAEJ0B,EAAStC,MAnBW,6c","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-button_4.entry.js"],"sourcesContent":["import { r as registerInstance, h, H as Host, g as getElement } from './index-def1ecaa.js';\n\nconst buttonCss = \":host{display:inline-block}.button-element span{top:-1px;display:block;position:relative;line-height:1;font-size:16px;font-family:soleil, sans-serif;font-style:normal;font-weight:600;letter-spacing:0.2px;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a.button-element span{top:initial}.button-element{text-decoration:none;padding:12px 25px;min-width:90px;height:42px;cursor:pointer;user-select:none;border:0;border-radius:4px;outline:none;display:inline-flex;box-sizing:border-box;background-size:cover;transition:background 0.25s ease-out, box-shadow 0.25s ease-out;color:var(--rs-color-white);width:100%;white-space:nowrap;justify-content:center;align-items:center;gap:8px}.button-element.small{padding-top:10px;padding-bottom:10px;height:36px}.button-element.small span{font-size:14px}.button-element:active{transition-delay:200ms}:host(.expand-block),:host(.expand-full){display:block}.button-element--collapse{min-width:auto;padding:0;aspect-ratio:1;height:auto}:host(.expand-block) .button-element{display:block;width:100%}:host(.expand-full) .button-element{display:block;width:100%;border-radius:0}.button-element.color--primary{background:var(--rs-color-primary-700)}.button-element.color--primary:hover{background:var(--rs-color-primary)}.button-element.color--primary:active{background:var(--rs-color-primary-300)}.button-element.color--negative{background:var(--rs-color-negative)}.button-element.color--secondary{background:var(--rs-color-secondary)}.button-element.color--secondary:hover{background:var(--rs-color-secondary-700)}.button-element.color--secondary:active{background:var(--rs-color-secondary-300)}.button-element.disabled span{color:var(--rs-color-white);pointer-events:none}.button-element.color--grey-light{color:var(--rs-color-secondary);background:transparent;box-shadow:inset 0 0 0 1px var(--rs-color-select-border)}:host(.expand-block) .button-element.color--grey-light span,:host(.expand-full) .button-element.color--grey-light span{font-weight:normal;color:var(--rs-color-secondary)}.button-element:not(.disabled).color--grey-light:hover{box-shadow:inset 0 0 0 1px var(--rs-color-grey)}.button-element.color--positive{background:var(--rs-color-positive)}.button-element.color--positive:hover{background:var(--rs-color-positive-700)}.button-element.color--positive:active{background:var(--rs-color-positive-300)}.button-element.color--text{color:var(--rs-color-grey);background:transparent}.button-element.color--text:hover{background:var(--rs-color-light)}.button-element.color--text:active{background:var(--rs-color-grey-light)}.button-element.disabled{box-shadow:none;background:var(--rs-color-grey-light);cursor:not-allowed}.button-element.disabled:hover{background:var(--rs-color-grey-light)}\";\nconst RsButtonStyle0 = buttonCss;\n\nconst Button = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /** (optional) primary, secondary, positive, grey defaults to primary. If set to grey, button will be an outline */\n this.color = 'primary';\n /** (optional) Puts the button in a disabled state */\n this.disabled = false;\n /**\n * (optional) Changes the button the small variation\n *\n * @property small Button with less height padding, and smaller font size\n * @property default Button with the default height and padding\n */\n this.size = 'default';\n /**\n * If true, replaces the inner html to a loading bar\n */\n this.loading = false;\n }\n getColorClass() {\n return `color--${this.color}`;\n }\n getExpandClass() {\n if (this.expand === 'block') {\n return 'expand-block';\n }\n else if (this.expand === 'full') {\n return 'expand-full';\n }\n return '';\n }\n setButtonWidth() {\n if (this.loading) {\n this.buttonElement.style.width = `${this.buttonElement.offsetWidth}px`;\n }\n else {\n this.buttonElement.style.width = null;\n }\n }\n render() {\n const { href, rel, target } = this;\n const TagType = this.href === undefined ? 'button' : 'a';\n const attrs = (TagType === 'a')\n ? {\n href,\n rel,\n target\n } : {};\n return (h(Host, { key: 'c3b642de2a5185a059c3a546cc8f6c48ecaece6d', class: this.getExpandClass(), style: {\n 'flex-grow': this.flexGrow\n } }, h(TagType, Object.assign({ key: 'c5754da876be113da788a028db0ff3759c526714', ref: (el) => this.buttonElement = el }, attrs, { disabled: this.disabled, class: [\n 'button-element',\n this.loading ? 'button-element--loading' : '',\n this.getColorClass(),\n this.size === 'small' ? 'small' : '',\n this.disabled ? 'disabled' : '',\n this.expand !== undefined ? `button-element--${this.expand}` : ''\n ].join(' ').trim(), style: {\n width: this.expand === 'collapse' ? `${this.width}px` : null,\n } }), this.renderStartIcon(), this.slot(), this.renderEndIcon())));\n }\n slot() {\n if (!this.el.textContent) {\n return null;\n }\n if (this.loading) {\n // return (<span><div class=\"button-element__loading-bar\"/></span>);\n return (h(\"rs-loader\", { type: \"indeterminate\" }));\n }\n return (h(\"span\", null, h(\"slot\", null)));\n }\n renderStartIcon() {\n return (this.iconStart !== undefined ? h(\"rs-icon\", { size: this.iconSize, color: this.iconColor, class: \"icon-start\", name: this.iconStart }) : null);\n }\n renderEndIcon() {\n return (this.iconEnd !== undefined ?\n h(\"rs-icon\", { size: this.iconSize, color: this.iconColor, class: \"icon-end\", name: this.iconEnd }) : null);\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"loading\": [\"setButtonWidth\"]\n }; }\n};\nButton.style = RsButtonStyle0;\n\nconst headerCss = \":host{display:block;font-family:soleil, sans-serif;font-style:normal;color:var(--rs-color-heading);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5{margin:0;padding:0;line-height:1.2em}h1{font-weight:600;font-size:50px}h2{font-weight:600;font-size:38px}h3{font-weight:600;font-size:26px}h4{font-weight:700;font-size:22px}h5{font-weight:600;font-size:16px}\";\nconst RsHeaderStyle0 = headerCss;\n\nconst Header = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /** (optional) 1...5 defaults to 2 */\n this.heading = '2';\n /**\n * Color of the header text\n */\n this.color = 'heading';\n }\n render() {\n const TagType = `h${this.heading}`;\n return (h(Host, { key: '730ed31799fa902f1172e11ec61cda07da228da6', style: {\n color: this.color !== undefined ? `var(--rs-color-${this.color})` : ''\n } }, h(TagType, { key: '3519f13751bdd567053216e963792ee7b0f7d665' }, h(\"slot\", { key: 'cfb2c79fdc3f68e502b530789d3afb0e05b10690' }))));\n }\n};\nHeader.style = RsHeaderStyle0;\n\nconst rsLoaderCss = \":host{display:block}.loader{margin:0 auto;font-size:10px;position:relative;text-indent:-9999em;border-top:1.1em solid rgb(26 36 40 / 0.2);border-right:1.1em solid rgb(26 36 40 / 0.2);border-bottom:1.1em solid rgb(26 36 40 / 0.2);border-left:1.1em solid #1a2428;transform:translateZ(0);animation:load8 1.1s infinite linear;display:inline-block;vertical-align:middle;transition:opacity 0.3s linear}.loader,.loader::after{border-radius:50%;width:10em;height:10em}@keyframes load8{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host(.indeterminate){width:100%}.indeterminate-loader{cursor:wait;display:flex;align-items:center;border-radius:3px;overflow:hidden;width:100%}.indeterminate-loader>*{width:100%}.indeterminate-loader__loading-bar{position:relative;overflow:hidden;height:5px;border-radius:3px;background-color:rgb(255 255 255 / 0.5);width:100%}.indeterminate-loader__loading-bar::before{position:absolute;top:0;bottom:0;left:0;content:\\\"\\\";animation:indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;border-radius:3px;background-color:rgb(255 255 255 / 0.5);will-change:left, right}.indeterminate-loader__loading-bar::after{position:absolute;top:0;bottom:0;left:0;content:\\\"\\\";animation:indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;animation-delay:1.15s;border-radius:3px;background-color:rgb(255 255 255 / 0.5);will-change:left, right}@keyframes indeterminate{0%{right:100%;left:-35%}60%{right:-90%;left:100%}100%{right:-90%;left:100%}}@keyframes indeterminate-short{0%{right:100%;left:-200%}60%{right:-8%;left:107%}100%{right:-8%;left:107%}}\";\nconst RsLoaderStyle0 = rsLoaderCss;\n\nconst RsLoader = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.type = 'spinner';\n }\n render() {\n return (h(Host, { key: '9a07d2ab96c0a18996f4ff287412493f0feaf454', class: this.type }, this.type === 'spinner' ? this.spinner() : this.indeterminate()));\n }\n spinner() {\n return (h(\"div\", { class: \"loader rs-loader\" }, \"Loading...\"));\n }\n indeterminate() {\n return (h(\"div\", { class: \"indeterminate-loader\" }, h(\"span\", null, h(\"div\", { class: \"indeterminate-loader__loading-bar\" }))));\n }\n};\nRsLoader.style = RsLoaderStyle0;\n\nconst subtitleCss = \":host{display:block;font-family:soleil, sans-serif;font-style:normal;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host(.subtitle__1){font-weight:400;font-size:18px;line-height:1.4em;letter-spacing:0.15px}:host(.subtitle__2){font-weight:300;font-size:12px;line-height:1.2em;letter-spacing:0.5px;text-transform:uppercase}:host(.subtitle__3){font-weight:500;font-size:10px;line-height:1.2em;letter-spacing:0.5px;text-transform:uppercase}\";\nconst RsSubtitleStyle0 = subtitleCss;\n\nconst Subtitle = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /** (optional) 1/2 defaults to 1 */\n this.subtitle = '1';\n /**\n * Color of the subtitle text\n */\n this.color = 'grey';\n }\n render() {\n return (h(Host, { key: '6909aabaaeef9272ce83f13ed4bf8b594e3dfc83', class: `subtitle__${this.subtitle}`, style: {\n color: this.color !== undefined ? `var(--rs-color-${this.color})` : ''\n } }, h(\"slot\", { key: 'c4628669381f6daa6d1afd0ddff388936086eb5d' })));\n }\n};\nSubtitle.style = RsSubtitleStyle0;\n\nexport { Button as rs_button, Header as rs_header, RsLoader as rs_loader, Subtitle as rs_subtitle };\n\n//# sourceMappingURL=rs-button_4.entry.js.map"],"names":["Button","constructor","hostRef","r","this","color","disabled","size","loading","getColorClass","getExpandClass","expand","setButtonWidth","buttonElement","style","width","offsetWidth","render","href","rel","target","TagType","undefined","attrs","h","H","key","class","flexGrow","Object","assign","ref","el","join","trim","renderStartIcon","slot","renderEndIcon","textContent","type","iconStart","iconSize","iconColor","name","iconEnd","g","watchers","Header","heading","RsLoader","spinner","indeterminate","Subtitle","subtitle"],"sourceRoot":""}
|
package/build/795.index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @rocketspark/domain-checker v1.0.
|
|
3
|
+
* @rocketspark/domain-checker v1.0.3
|
|
4
4
|
* https://github.com/rocketspark/domain-checker.git
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) Lee Reichardt and project contributors.
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[795],{2419:function(t,e,s){s.d(e,{d:function(){return o},i:function(){return r},s:function(){return n}});var i=s(7915);const o=(t,e=0)=>{let s;return(...i)=>{clearTimeout(s),s=setTimeout(t,e,...i)}},r=(t,e,s)=>{const o=(void 0!==t.target?t.target:s).tagName.toLowerCase().replace("rs-",""),r=t.detail,n={},l=e.get(o)||{};let a=!1;Object.keys(r).forEach((t=>{if(r[t]){const e=`item-${t}`;l[e]||(a=!0),n[e]=!0}})),a||Object.keys(n).length===Object.keys(l).length||(a=!0),a&&(e.set(o,n),(0,i.f)(s))},n=(t,e,s,i=!1)=>{!e&&!s||i||null!==t&&(t.style.display="block",setTimeout((function(){t.style.opacity="1"}),150))}},2795:function(t,e,s){s.r(e),s.d(e,{rs_dropdown:function(){return n},rs_input:function(){return l},rs_label:function(){return a},rs_toggle:function(){return h},rs_toggle_item:function(){return c}});var i=s(7915),o=s(2419);class r{constructor(t,e,s=null){this._value=t,this._label=e,this._style=s,this.onClick=t=>()=>{t(this)}}element(){return this._el}value(){return this._value}label(){return this._label}render(t,e){return(0,i.h)("div",{key:this.value(),ref:t=>this._el=t,class:{dropdown__item:!0,"dropdown__item--selected":e},"data-value":this.value(),onClick:this.onClick(t)},(0,i.h)("rs-caption",{style:Object.assign(Object.assign({},this._style),{overflow:"hidden",textOverflow:"ellipsis"})},this._label))}}const n=class{constructor(t){(0,i.r)(this,t),this.rsChange=(0,i.c)(this,"rsChange",7),this.showDropdown=(0,i.c)(this,"showDropdown",7),this.hideDropdown=(0,i.c)(this,"hideDropdown",7),this.toggleDropdown=()=>{var t,e;(0!==this._items.length||this.hasActionTop)&&(this.$container.classList.toggle("is-open"),this.$container.classList.contains("is-open")?(this.showDropdown.emit(),this.$itemContainer.scrollTop=(null===(t=this.selectedItem)||void 0===t?void 0:t.element().offsetTop)-this.$itemContainer.offsetTop-(null===(e=this.selectedItem)||void 0===e?void 0:e.element().offsetHeight)):this.hideDropdown.emit())},this.filterItems=t=>{this.filterText=t.target.value},this.selectItem=t=>{this.selectedItem=t,this.value=t.value(),this.closeDropdown(),this.rsChange.emit(t.value())},this.value=null,this.items=[],this.type="selectOne",this.size="large",this.maxHeight="300px",this.searchable=!1,this.placeholder="Choose an option",this.selectedIndex=null,this.maxWidth=null,this._items=void 0,this.selectedItem=null,this.filterText=""}async clear(){this.selectedItem=null}render(){return(0,i.h)(i.H,{tabindex:0},(0,i.h)("div",{class:`container is-${this.size}`,ref:t=>this.$container=t},(0,i.h)("div",{class:"selected__container",onClick:this.toggleDropdown},this.renderSelected()),(0,i.h)("div",{class:"dropdown__container",style:{maxWidth:this.maxWidth}},this.searchable?this.renderSearch():null,this.hasActionTop?this.renderAction("top"):null,(0,i.h)("div",{class:"dropdown__items",ref:t=>this.$itemContainer=t,style:{maxHeight:this.maxHeight}},this.renderItems()))))}componentWillLoad(){this.hasActionTop=!!this.el.querySelector('[slot="action-top"]')}componentWillRender(){var t,e,s;let i;if(i="string"==typeof this.items?JSON.parse(this.items):this.items,this._items=i.map((t=>new r(t.value,t.label,t.style))),null===this.selectedItem&&null!==this.selectedIndex&&(this.selectedItem=null!==(t=this._items[this.selectedIndex])&&void 0!==t?t:null),null!==this.value){const t=null!==(e=this._items.find((t=>t.value()===this.value)))&&void 0!==e?e:null;(null===(s=this.selectedItem)||void 0===s?void 0:s.value())!==(null==t?void 0:t.value())&&(this.selectedItem=t)}}componentDidLoad(){window.addEventListener("mousedown",(t=>{t.composedPath().includes(this.el)||this.closeDropdown()})),"large"===this.size&&this.$container.style.setProperty("--rs-dropdown-selected-container-height","42px"),"small"===this.size&&this.$container.style.setProperty("--rs-dropdown-selected-container-height","32px")}renderSelected(){var t,e;const s=null!==(e=null===(t=this.selectedItem)||void 0===t?void 0:t.label())&&void 0!==e?e:this.placeholder;if("large"===this.size)return(0,i.h)("rs-content",{class:"dropdown__selected",body:2},s);if("small"===this.size)return(0,i.h)("rs-caption",{class:"dropdown__selected"},s);throw new Error(`Invalid size ${this.size}`)}renderItems(){if(0===this._items.length)return null;const t=this._items.filter((t=>t.label().toLowerCase().includes(this.filterText.toLowerCase())));return 0===t.length?(0,i.h)("div",{class:"dropdown__item dropdown__item--no-results"},"No results found"):t.map((t=>{var e;return t.render(this.selectItem,t.value()===(null===(e=this.selectedItem)||void 0===e?void 0:e.value()))}))}renderSearch(){return(0,i.h)("div",{class:"dropdown__search"},(0,i.h)("input",{type:"text",onInput:this.filterItems}))}renderAction(t){return(0,i.h)("div",{class:`dropdown__action dropdown__action--${t}`},(0,i.h)("slot",{name:`action-${t}`}))}closeDropdown(){this.$container.classList.remove("is-open")}get el(){return(0,i.g)(this)}};n.style="*{box-sizing:border-box;margin:0}.container{--rs-dropdown-selected-container-height:0;position:relative;width:100%}.selected__container{position:relative;display:flex;justify-content:space-between;align-items:center;height:var(--rs-dropdown-selected-container-height);border-radius:4px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border);cursor:pointer}.is-small .selected__container{background:var(--rs-color-white);padding:8px 12px}.is-large .selected__container{background:var(--rs-color-select-background);padding:12px}.is-open .selected__container{border-radius:4px 4px 0 0}:host(:focus) .selected__container,:host(:active) .selected__container{box-shadow:inset 0 0 0 1px #b7b7b7}.dropdown__selected{white-space:nowrap;width:100%;overflow:hidden}.selected__container::after{content:'';position:absolute;top:calc(50% - 2.5px);right:12px;border-style:solid;border-color:#333 var(--rs-color-transparent) var(--rs-color-transparent);border-width:5px}.selected__container::before{content:\"\";background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%);position:absolute;width:31px;right:1px;top:1px;bottom:1px;border-radius:4px}.dropdown__container{position:absolute;top:calc(var(--rs-dropdown-selected-container-height) - 1px);display:none;min-width:100%;width:min-content;white-space:nowrap;overflow:hidden;background:var(--rs-color-white);border:solid 1px #b7b7b7;border-radius:0 0 4px 4px}.is-open .dropdown__container{display:block;z-index:1}.dropdown__search{border-bottom:1px solid #ddd}.dropdown__search input{width:100%;padding:10px;border:none;color:var(--rs-color-black);font-family:Soleil, sans-serif;outline:none;appearance:none}.dropdown__action{width:100%;padding:16px;border-bottom:1px solid #ddd}.dropdown__action:hover{background-color:var(--rs-color-light)}.dropdown__items{overflow:hidden auto}.dropdown__item{padding:10px;cursor:pointer}.dropdown__item--selected,.dropdown__item:hover{background-color:var(--rs-color-light)}.dropdown__item--no-results{cursor:default}.dropdown__item--no-results:hover{background-color:initial}";const l=class{constructor(t){(0,i.r)(this,t),this.rsInput=(0,i.c)(this,"rsInput",7),this.rsInputChanged=(0,i.c)(this,"rsInputChanged",7),this.rsInputNoFocus=(0,i.c)(this,"rsInputNoFocus",7),this.rsInputFocus=(0,i.c)(this,"rsInputFocus",7),this.rsItem=(0,i.c)(this,"rsItem",7),this.didBlurAfterEdit=!1,this.hasStartSlot=!1,this.hasEndSlot=!1,this.onInput=t=>{const e=t.target;null!==e&&(this.value=e.value||""),this.rsInput.emit(t)},this.onFocus=()=>{this.hasFocus=!0,this.focusChanged(),this.emitRsItem(),this.rsInputFocus.emit()},this.focusChanged=()=>{!this.hasFocus&&this.hasValue()&&(this.didBlurAfterEdit=!0)},this.shouldClearOnEdit=()=>{const{type:t,clearOnEdit:e}=this;return void 0===e?"password"===t:e},this.onKeyDown=()=>{this.shouldClearOnEdit()&&this.didBlurAfterEdit&&this.hasValue()&&this.clearTextInput(),this.didBlurAfterEdit=!1},this.clearTextInput=t=>{void 0===this.clearInput||this.readonly||this.disabled||void 0===t||(t.preventDefault(),t.stopPropagation()),this.value="",null!==this.nativeElement&&(this.nativeElement.value="")},this.onBlur=()=>{this.hasFocus=!1,this.focusChanged(),this.emitRsItem(),this.rsInputNoFocus.emit()},this.hasFocus=!1,this.charsLeft=0,this.type="text",this.value="",this.disabled=!1,this.readonly=!1,this.placeholder=void 0,this.clearOnEdit=!1,this.clearInput=!1,this.required=!1,this.hideMax=!1,this.hardLimit=null,this.softLimit=null,this.name=void 0,this.hasError=!1,this.textAlign="left",this.size="default"}disabledChanged(){this.emitRsItem()}valueChanged(){this.emitRsItem(),this.changeMaxLengthText(),this.rsInputChanged.emit({value:null==this.value?this.value:this.value.toString()})}hasErrorChanged(){this.emitRsItem()}async update(){(0,i.f)(this.el)}async setFocus(){null!==this.nativeElement&&this.nativeElement.focus()}getInputElement(){return Promise.resolve(this.nativeElement)}getValue(){return this.value||""}hasValue(){return this.getValue().length>0}emitRsItem(){this.rsItem.emit({input:!0,interactive:!0,"has-focus":this.hasFocus,"has-value":this.hasValue(),"has-placeholder":null!==this.placeholder,"has-error":this.hasError,"has-max":null!==this.hardLimit||null!==this.softLimit,"hide-max":this.hideMax,"interactive-disabled":this.disabled,"input-has-start-slot":this.hasStartSlot,"input-has-end-slot":this.hasEndSlot,"input-chars-over-max":this.charsLeft<0,"input-is-required":this.required})}changeMaxLengthText(){if(null!==this.softLimit&&this.softLimit>0&&!this.hideMax){const t=this.value.length;this.charsLeft=this.softLimit-t;const e=this.el.querySelector(".max-length");null!==e&&(this.charsLeft<0?(e.innerHTML=`${Math.abs(this.charsLeft)} over`,this.el.classList.add("input-chars-over-max")):(e.innerHTML=`${this.charsLeft} left`,this.el.classList.remove("input-chars-over-max")))}}componentDidLoad(){if(void 0!==this.softLimit||void 0!==this.hardLimit){const t=this.el.querySelector(".max-length");(0,o.s)(t,this.hardLimit,this.softLimit,this.hideMax),this.changeMaxLengthText()}}connectedCallback(){this.hasStartSlot=null!==this.el.querySelector('[slot="start"]'),this.hasEndSlot=null!==this.el.querySelector('[slot="end"]'),this.emitRsItem()}render(){const t=this.getValue();let e=null;if((this.hardLimit||this.softLimit)&&!this.hideMax){const t=this.hardLimit||this.softLimit;e=(0,i.h)("span",{class:"max-length"},t," max")}return(0,i.h)(i.H,{class:{"has-value":this.hasValue(),"has-focus":this.hasFocus,"has-placeholder":null!==this.placeholder,"has-max":null!==this.hardLimit||null!==this.softLimit,"hide-max":this.hideMax,"chars-over-max":this.charsLeft<0,"has-error":this.hasError,[`text-align-${this.textAlign}`]:!0,[`size-${this.size}`]:!0}},e,(0,i.h)("div",{class:"rs-input__inner"},(0,i.h)("slot",{name:"start"}),(0,i.h)("input",{class:"native-input",ref:t=>this.nativeElement=t,disabled:this.disabled,readonly:this.readonly,onInput:this.onInput,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,placeholder:this.placeholder,type:this.type,required:this.required,name:this.name,maxlength:this.hardLimit,value:t}),(0,i.h)("slot",{name:"end"})))}get el(){return(0,i.g)(this)}static get watchers(){return{disabled:["disabledChanged"],value:["valueChanged"],hasError:["hasErrorChanged"]}}};l.style='.sc-rs-input-h{display:block;position:static;width:100%;padding:0}.rs-input__inner.sc-rs-input{display:flex;align-items:center;justify-content:flex-start;width:100%;height:42px;box-shadow:none;background:var(--rs-color-light);border:none;box-sizing:border-box;border-radius:4px;padding:11px 14px;transition:box-shadow .15s ease-out, background-color .15s ease-out}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input{height:32px;padding:8px}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{padding:0 0 2px 0}.text-align-center.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:center}.text-align-right.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:right}.text-align-left.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:left}.native-input.sc-rs-input,.native-input.sc-rs-input:focus{border:none;background-image:none;background-color:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-appearance:none;outline:none;height:100%;width:100%;display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:14px;line-height:140%;color:var(--rs-color-heading);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;resize:none;padding:0}.native-input.sc-rs-input::placeholder{color:var(--rs-color-grey);font-family:Soleil, sans-serif;font-style:normal;font-weight:normal}.native-input[disabled].sc-rs-input{opacity:0.4}.has-value.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-primary);background-color:var(--rs-color-white);color:var(--rs-color-heading);outline:none;pointer-events:auto;opacity:1}.has-error.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-error.sc-rs-input-h:not(.has-focus) .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-grey)}.has-value.sc-rs-input-h:not(.has-focus) .max-length.sc-rs-input{display:block;opacity:1;color:var(--rs-color-grey-light)}.sc-rs-input-h .max-length.sc-rs-input{font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:12px;line-height:13px;text-align:right;color:var(--rs-color-grey);display:none;opacity:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:5px;transition:opacity .15s ease-out, color .15s ease-out}.chars-over-max.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-negative)}.sc-rs-input-s>[slot="start"]{margin-right:10px}.sc-rs-input-s>[slot="end"]{margin-left:10px}';const a=class{constructor(t){(0,i.r)(this,t),this.rsItem=(0,i.c)(this,"rsItem",7),this.color="grey",this.position="floating"}emitRsItem(){this.rsItem.emit({[`label-${this.position}`]:null!==this.position,"has-label":!0})}render(){const t=this.position;return this.emitRsItem(),(0,i.h)(i.H,{class:{[`label-${t}`]:null!==t},style:{color:void 0!==this.color?`var(--rs-color-${this.color})`:""}},(0,i.h)("slot",null))}get el(){return(0,i.g)(this)}};a.style="rs-label{display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:600;font-size:12px;color:var(--rs-color-grey);line-height:13px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;pointer-events:none;margin-bottom:5px}.item-has-focus rs-label{color:var(--rs-color-primary-700) !important}rs-label.label-floating{transform:translate3d(0, 32px, 0);transform-origin:left top;transition:transform 0.25s ease-in-out, font-size 0.25s ease-in-out;font-size:14px;font-weight:normal;padding-left:14px}.item-has-focus rs-label.label-floating,.item-has-value rs-label.label-floating{transform:translate3d(0, 0, 0);font-size:12px;font-weight:600}.item-has-max rs-label.label-fixed,.item-has-max rs-label.label-floating{position:absolute;top:0}.item-has-error rs-label{color:var(--rs-color-negative) !important}.item-input-has-start-slot rs-label.label-floating,.item-textarea-has-start-slot rs-label.label-floating{padding-left:38px}.item-input-has-start-slot.item-has-focus rs-label.label-floating,.item-input-has-start-slot.item-has-value rs-label.label-floating,.item-textarea-has-start-slot.item-has-focus rs-label.label-floating,.item-textarea-has-start-slot.item-has-value rs-label.label-floating{transform:translate3d(-22px, 0, 0);font-size:12px}";const h=class{constructor(t){(0,i.r)(this,t),this.toggle=(0,i.c)(this,"toggle",7),this.hasMovedActiveTab=!1,this.renderToggleBar=()=>{this.toggleItems=this.host.querySelectorAll("rs-toggle-item"),this.activeTabElement.style.width=`calc(${100/this.toggleItems.length}%)`,this.toggleItems.forEach(((t,e)=>{null!==t.getAttribute("active")&&this.moveActiveTab(e),t.addEventListener("click",(()=>{this.currentPosition!==e&&(this.moveActiveTab(e),this.removeAllActiveProp(),t.setAttribute("active","true"),this.emitToggleEvent())}))})),this.hasMovedActiveTab||this.moveActiveTab(0)},this.currentPosition=0}async setActivePosition(t=0){this.removeAllActiveProp(),this.moveActiveTab(t),this.emitToggleEvent()}removeAllActiveProp(){this.toggleItems.forEach((t=>{t.removeAttribute("active")}))}moveActiveTab(t){this.activeTabElement.style.left=`calc(${100/this.toggleItems.length*t}%)`,this.currentPosition=t,this.hasMovedActiveTab=!0}emitToggleEvent(){this.toggle.emit({value:this.currentPosition,target:this.toggleItems[this.currentPosition]})}componentDidRender(){this.renderToggleBar()}render(){return(0,i.h)(i.H,null,(0,i.h)("div",{class:"toggle"},(0,i.h)("div",{class:"toggle__items"},(0,i.h)("slot",{onSlotchange:this.renderToggleBar}),(0,i.h)("div",{ref:t=>this.activeTabElement=t,class:"active-tab"}))))}get host(){return(0,i.g)(this)}};h.style=".toggle{display:block;padding:4px;border-radius:7px;background:var(--rs-color-light)}.toggle__items{display:flex;flex-direction:row;position:relative}.active-tab{position:absolute;height:calc(100%);border-radius:4px;background:var(--rs-color-white);box-shadow:0 1px 5px rgb(195 213 226 / 0.62);z-index:1;transition:left 0.15s ease-out}";const c=class{constructor(t){(0,i.r)(this,t),this.active=!1}render(){return(0,i.h)(i.H,{class:{active:this.active}},(0,i.h)("slot",null))}get el(){return(0,i.g)(this)}};c.style=":host{box-sizing:border-box;display:block;padding:7px;text-align:center;z-index:2;cursor:pointer;color:var(--rs-color-secondary);font-family:Soleil, sans-serif;font-size:14px;user-select:none;flex-grow:1;flex-shrink:1;flex-basis:0;line-height:initial}:host(.active){cursor:default}"}}]);
|
|
12
|
+
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[795],{7402:function(t,e,s){s.d(e,{d:function(){return o},i:function(){return r},s:function(){return n}});var i=s(6919);const o=(t,e=0)=>{let s;return(...i)=>{clearTimeout(s),s=setTimeout(t,e,...i)}},r=(t,e,s)=>{const o=(void 0!==t.target?t.target:s).tagName.toLowerCase().replace("rs-",""),r=t.detail,n={},a=e.get(o)||{};let l=!1;Object.keys(r).forEach((t=>{if(r[t]){const e=`item-${t}`;a[e]||(l=!0),n[e]=!0}})),l||Object.keys(n).length===Object.keys(a).length||(l=!0),l&&(e.set(o,n),(0,i.f)(s))},n=(t,e,s,i=!1)=>{!e&&!s||i||null!==t&&(t.style.display="block",setTimeout((function(){t.style.opacity="1"}),150))}},2795:function(t,e,s){s.r(e),s.d(e,{rs_dropdown:function(){return n},rs_input:function(){return a},rs_label:function(){return l},rs_toggle:function(){return h},rs_toggle_item:function(){return c}});var i=s(6919),o=s(7402);class r{constructor(t,e,s=null,i=""){this._value=t,this._label=e,this._style=s,this._prefix=i,this.onClick=t=>()=>{t(this)}}element(){return this._el}value(){return this._value}label(){return this._label}prefixDisplay(){return""!==this._prefix?(0,i.h)("span",{class:"dropdown__prefix"}," ",this._prefix," / "):""}render(t,e,s){return(0,i.h)("div",{key:this.value(),ref:t=>this._el=t,class:{dropdown__item:!0,"dropdown__item--selected":e,"dropdown__item--select-many":s},"data-value":this.value(),onClick:this.onClick(t)},s?(0,i.h)("rs-checkbox",{checked:e,style:{pointerEvents:"none"}},this.prefixDisplay()," ",this._label):(0,i.h)("rs-caption",{style:Object.assign(Object.assign({},this._style),{overflow:"hidden",textOverflow:"ellipsis"})},this.prefixDisplay(),this._label))}}const n=class{constructor(t){(0,i.r)(this,t),this.rsChange=(0,i.c)(this,"rsChange",7),this.showDropdown=(0,i.c)(this,"showDropdown",7),this.hideDropdown=(0,i.c)(this,"hideDropdown",7),this.value=null,this.items=[],this.type="selectOne",this.size="large",this.maxHeight="300px",this.searchable=!1,this.placeholder="Choose an option",this.selectedIndex=null,this.maxWidth=null,this.selectedItem=null,this.selectedItems=[],this.filterText="",this.toggleDropdown=()=>{var t,e;(0!==this._items.length||this.hasActionTop)&&(this.$container.classList.toggle("is-open"),this.$container.classList.contains("is-open")?(this.showDropdown.emit(),this.$itemContainer.scrollTop=(null===(t=this.selectedItem)||void 0===t?void 0:t.element().offsetTop)-this.$itemContainer.offsetTop-(null===(e=this.selectedItem)||void 0===e?void 0:e.element().offsetHeight)):this.hideDropdown.emit())},this.filterItems=t=>{this.filterText=t.target.value},this.selectItem=t=>{"selectOne"===this.type?(this.selectedItem=t,this.value=t.value(),this.closeDropdown(),this.rsChange.emit(t.value())):"selectMany"===this.type&&(this.selectedItems.some((e=>e.value()==t.value()))?(this.selectedItems=this.selectedItems.filter((e=>e.value()!=t.value())),this.value=null,this.rsChange.emit(this.selectedItems.map((t=>t.value())))):(this.selectedItems=[...this.selectedItems,t],this.value=null,this.rsChange.emit(this.selectedItems.map((t=>t.value())))))}}async clear(){this.selectedItem=null,this.selectedItems=[]}render(){return(0,i.h)(i.H,{key:"453ebe995d8af778d3e00d69e16f611485190817",tabindex:0},(0,i.h)("div",{key:"99cc4e291745a53cc6bfec98512bd26e31ded81a",class:`container is-${this.size}`,ref:t=>this.$container=t},(0,i.h)("div",{key:"4ca92a7f28d201c34c1327f8afef34b4db1318a3",class:"selected__container",onClick:this.toggleDropdown},this.renderSelected()),(0,i.h)("div",{key:"ad7370913dc6371935905c030a72ed81180b3eed",class:"dropdown__container",style:{maxWidth:this.maxWidth}},this.searchable?this.renderSearch():null,this.hasActionTop?this.renderAction("top"):null,(0,i.h)("div",{key:"5508779a331e8cf3345f9891f4e460dc6b835e7c",class:"dropdown__items",ref:t=>this.$itemContainer=t,style:{maxHeight:this.maxHeight}},this.renderItems()))))}componentWillLoad(){this.hasActionTop=!!this.el.querySelector('[slot="action-top"]')}componentWillRender(){var t,e,s;let i;if(i="string"==typeof this.items?JSON.parse(this.items):this.items,this._items=i.map((t=>new r(t.value,t.label,t.style,t.prefix))),null===this.selectedItem&&null!==this.selectedIndex&&(this.selectedItem=null!==(t=this._items[this.selectedIndex])&&void 0!==t?t:null),null!==this.value)if("selectOne"===this.type){const t=null!==(e=this._items.find((t=>t.value()==this.value)))&&void 0!==e?e:null;(null===(s=this.selectedItem)||void 0===s?void 0:s.value())!==(null==t?void 0:t.value())&&(this.selectedItem=t)}else"selectMany"===this.type&&(this.value="string"==typeof this.value?JSON.parse(this.value):this.value,this.selectedItems=this._items.filter((t=>this.value.includes(t.value()))))}componentDidLoad(){window.addEventListener("mousedown",(t=>{t.composedPath().includes(this.el)||this.closeDropdown()})),"large"===this.size&&this.$container.style.setProperty("--rs-dropdown-selected-container-height","42px"),"small"===this.size&&this.$container.style.setProperty("--rs-dropdown-selected-container-height","32px")}renderSelected(){var t;let e=this.placeholder;if("selectOne"===this.type)e=null===(t=this.selectedItem)||void 0===t?void 0:t.label();else if("selectMany"===this.type){const t=this.selectedItems.map((t=>t.label()));1===t.length?e=t[0]:t.length>1&&(e=`${t.slice(0,-1).join(", ")} & ${t.slice(-1)}`)}const s=null!=e?e:this.placeholder;if("large"===this.size)return(0,i.h)("rs-content",{class:"dropdown__selected",body:2},s);if("small"===this.size)return(0,i.h)("rs-caption",{class:"dropdown__selected"},s);throw new Error(`Invalid size ${this.size}`)}renderItems(){if(0===this._items.length)return null;const t=this._items.filter((t=>t.label().toLowerCase().includes(this.filterText.toLowerCase())));return 0===t.length?(0,i.h)("div",{class:"dropdown__item dropdown__item--no-results"},"No results found"):t.map((t=>{var e;let s=!1;return"selectOne"===this.type?s=t.value()==(null===(e=this.selectedItem)||void 0===e?void 0:e.value()):"selectMany"===this.type&&(s=this.selectedItems.some((e=>e.value()==t.value()))),t.render(this.selectItem,s,"selectMany"===this.type)}))}renderSearch(){return(0,i.h)("div",{class:"dropdown__search"},(0,i.h)("rs-icon",{class:"dropdown__search-icon",name:"search"}),(0,i.h)("input",{type:"text",onInput:this.filterItems}))}renderAction(t){return(0,i.h)("div",{class:`dropdown__action dropdown__action--${t}`},(0,i.h)("slot",{name:`action-${t}`}))}closeDropdown(){this.$container.classList.remove("is-open")}get el(){return(0,i.g)(this)}};n.style="*{box-sizing:border-box;margin:0}.container{--rs-dropdown-selected-container-height:0;position:relative;width:100%}.selected__container{position:relative;display:flex;justify-content:space-between;align-items:center;height:var(--rs-dropdown-selected-container-height);border-radius:4px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border);background:var(--rs-color-white);cursor:pointer}.is-small .selected__container{padding:8px 12px}.is-large .selected__container{padding:12px}.is-open .selected__container{border-radius:4px 4px 0 0}:host(:focus) .selected__container,:host(:active) .selected__container{box-shadow:inset 0 0 0 1px #b7b7b7}.dropdown__selected{white-space:nowrap;width:100%;overflow:hidden}.selected__container::after{content:'';position:absolute;top:calc(50% - 2.5px);right:12px;border-style:solid;border-color:#333 var(--rs-color-transparent) var(--rs-color-transparent);border-width:5px}.selected__container::before{content:\"\";position:absolute;width:31px;right:1px;top:1px;bottom:1px;border-radius:4px}.dropdown__prefix{color:var(--rs-color-grey-300)}.is-large .selected__container::before{background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%)}.is-small .selected__container::before{background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%)}.dropdown__container{position:absolute;top:calc(var(--rs-dropdown-selected-container-height) - 1px);display:none;min-width:100%;width:min-content;white-space:nowrap;overflow:hidden;background:var(--rs-color-white);border:solid 1px #b7b7b7;border-radius:0 0 4px 4px}.is-open .dropdown__container{display:block;z-index:1}.dropdown__search{border-bottom:1px solid #ddd;position:relative}.dropdown__search-icon{position:absolute;top:50%;left:12px;transform:translateY(-50%);color:var(--rs-color-grey-300);z-index:1}.dropdown__search input{width:100%;padding:10px 10px 10px 40px;border:none;color:var(--rs-color-black);font-family:Soleil, sans-serif;outline:none;appearance:none}.dropdown__action{width:100%;padding:16px;border-bottom:1px solid #ddd}.dropdown__action:hover{background-color:var(--rs-color-light)}.dropdown__items{overflow:hidden auto}.dropdown__item{padding:10px;cursor:pointer}.dropdown__item--selected:not(.dropdown__item--select-many),.dropdown__item:hover{background-color:var(--rs-color-light)}.dropdown__item--no-results{cursor:default}.dropdown__item--no-results:hover{background-color:initial}";const a=class{constructor(t){(0,i.r)(this,t),this.rsInput=(0,i.c)(this,"rsInput",7),this.rsKeyDown=(0,i.c)(this,"rsKeyDown",7),this.rsInputChanged=(0,i.c)(this,"rsInputChanged",7),this.rsInputNoFocus=(0,i.c)(this,"rsInputNoFocus",7),this.rsInputFocus=(0,i.c)(this,"rsInputFocus",7),this.rsItem=(0,i.c)(this,"rsItem",7),this.didBlurAfterEdit=!1,this.hasStartSlot=!1,this.hasEndSlot=!1,this.hasFocus=!1,this.charsLeft=0,this.type="text",this.value="",this.disabled=!1,this.readonly=!1,this.clearOnEdit=!1,this.clearInput=!1,this.required=!1,this.hideMax=!1,this.hardLimit=null,this.softLimit=null,this.hasError=!1,this.textAlign="left",this.size="default",this.onInput=t=>{const e=t.target;null!==e&&(this.value=e.value||""),this.rsInput.emit(t)},this.onFocus=()=>{this.hasFocus=!0,this.focusChanged(),this.emitRsItem(),this.rsInputFocus.emit()},this.focusChanged=()=>{!this.hasFocus&&this.hasValue()&&(this.didBlurAfterEdit=!0)},this.shouldClearOnEdit=()=>{const{type:t,clearOnEdit:e}=this;return void 0===e?"password"===t:e},this.onKeyDown=t=>{this.shouldClearOnEdit()&&this.didBlurAfterEdit&&this.hasValue()&&this.clearTextInput(),this.didBlurAfterEdit=!1,this.rsKeyDown.emit(t)},this.clearTextInput=t=>{void 0===this.clearInput||this.readonly||this.disabled||void 0===t||(t.preventDefault(),t.stopPropagation()),this.value="",null!==this.nativeElement&&(this.nativeElement.value="")},this.onBlur=()=>{this.hasFocus=!1,this.focusChanged(),this.emitRsItem(),this.rsInputNoFocus.emit()}}disabledChanged(){this.emitRsItem()}valueChanged(){this.emitRsItem(),this.changeMaxLengthText(),this.rsInputChanged.emit({value:null==this.value?this.value:this.value.toString()})}hasErrorChanged(){this.emitRsItem()}async update(){(0,i.f)(this.el)}async setFocus(){null!==this.nativeElement&&this.nativeElement.focus()}getInputElement(){return Promise.resolve(this.nativeElement)}getValue(){return this.value||""}hasValue(){return this.getValue().length>0}emitRsItem(){this.rsItem.emit({input:!0,interactive:!0,"has-focus":this.hasFocus,"has-value":this.hasValue(),"has-placeholder":null!==this.placeholder,"has-error":this.hasError,"has-max":null!==this.hardLimit||null!==this.softLimit,"hide-max":this.hideMax,"interactive-disabled":this.disabled,"input-has-start-slot":this.hasStartSlot,"input-has-end-slot":this.hasEndSlot,"input-chars-over-max":this.charsLeft<0,"input-is-required":this.required})}changeMaxLengthText(){if(null!==this.softLimit&&this.softLimit>0&&!this.hideMax){const t=this.value.length;this.charsLeft=this.softLimit-t;const e=this.el.querySelector(".max-length");null!==e&&(this.charsLeft<0?(e.innerHTML=`${Math.abs(this.charsLeft)} over`,this.el.classList.add("input-chars-over-max")):(e.innerHTML=`${this.charsLeft} left`,this.el.classList.remove("input-chars-over-max")))}}dataAttributes(){return Object.keys(this.el.dataset).reduce(((t,e)=>(t[`data-${e}`]=this.el.dataset[e],t)),{})}componentDidLoad(){if(void 0!==this.softLimit||void 0!==this.hardLimit){const t=this.el.querySelector(".max-length");(0,o.s)(t,this.hardLimit,this.softLimit,this.hideMax),this.changeMaxLengthText()}}connectedCallback(){this.hasStartSlot=null!==this.el.querySelector('[slot="start"]'),this.hasEndSlot=null!==this.el.querySelector('[slot="end"]'),this.emitRsItem()}render(){const t=this.getValue();let e=null;if((this.hardLimit||this.softLimit)&&!this.hideMax){const t=this.hardLimit||this.softLimit;e=(0,i.h)("span",{key:"43796315f9cf5aee0f1416f9638c6023d18f371c",class:"max-length"},t," max")}return(0,i.h)(i.H,{key:"ac76f2196206d4fc99a05f5c6a64ec5590f1e065",class:{"has-value":this.hasValue(),"has-focus":this.hasFocus,"has-placeholder":null!==this.placeholder,"has-max":null!==this.hardLimit||null!==this.softLimit,"hide-max":this.hideMax,"chars-over-max":this.charsLeft<0,"has-error":this.hasError,[`text-align-${this.textAlign}`]:!0,[`size-${this.size}`]:!0}},e,(0,i.h)("div",{key:"549979b3c5ab691fcfa702fb43863db80835e6c1",class:"rs-input__inner"},(0,i.h)("slot",{key:"f6fb85cf6533e447c22a7a2f615a721dcbeee5bb",name:"start"}),(0,i.h)("input",Object.assign({key:"bcba32b735ac871b9ffbcd9c07c74f4d27bd50f5"},this.dataAttributes(),{class:"native-input",ref:t=>this.nativeElement=t,disabled:this.disabled,readonly:this.readonly,onInput:this.onInput,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,placeholder:this.placeholder,type:this.type,required:this.required,name:this.name,maxlength:this.hardLimit,min:this.min,max:this.max,value:t})),(0,i.h)("slot",{key:"248265fc89456303f1a3ab57ed1d053e5248f35e",name:"end"})))}get el(){return(0,i.g)(this)}static get watchers(){return{disabled:["disabledChanged"],value:["valueChanged"],hasError:["hasErrorChanged"]}}};a.style='.sc-rs-input-h{display:block;position:static;width:100%;padding:0}.rs-input__inner.sc-rs-input{display:flex;align-items:center;justify-content:flex-start;width:100%;height:42px;box-shadow:none;background:var(--rs-color-light);border:none;box-sizing:border-box;border-radius:4px;padding:11px 14px;transition:box-shadow .15s ease-out, background-color .15s ease-out}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input{height:32px;padding:8px}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{padding:0 0 2px 0}.text-align-center.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:center}.text-align-right.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:right}.text-align-left.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:left}.native-input.sc-rs-input,.native-input.sc-rs-input:focus{border:none;background-image:none;background-color:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-appearance:none;outline:none;height:100%;width:100%;display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:14px;line-height:140%;color:var(--rs-color-heading);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;resize:none;padding:0}.native-input.sc-rs-input::placeholder{color:var(--rs-color-grey);font-family:Soleil, sans-serif;font-style:normal;font-weight:normal}.native-input[disabled].sc-rs-input{opacity:0.4}.has-value.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-primary);background-color:var(--rs-color-white);color:var(--rs-color-heading);outline:none;pointer-events:auto;opacity:1}.has-error.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-error.sc-rs-input-h:not(.has-focus) .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-grey)}.has-value.sc-rs-input-h:not(.has-focus) .max-length.sc-rs-input{display:block;opacity:1;color:var(--rs-color-grey-light)}.sc-rs-input-h .max-length.sc-rs-input{font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:12px;line-height:13px;text-align:right;color:var(--rs-color-grey);display:none;opacity:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:5px;transition:opacity .15s ease-out, color .15s ease-out}.chars-over-max.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-negative)}.sc-rs-input-s>[slot="start"]{margin-right:10px}.sc-rs-input-s>[slot="end"]{margin-left:10px}';const l=class{constructor(t){(0,i.r)(this,t),this.rsItem=(0,i.c)(this,"rsItem",7),this.color="grey",this.position="floating"}emitRsItem(){this.rsItem.emit({[`label-${this.position}`]:null!==this.position,"has-label":!0})}render(){const t=this.position;return this.emitRsItem(),(0,i.h)(i.H,{key:"db0eb178ea17a5c03e6fcdb44d4ff1a2d260a98d",class:{[`label-${t}`]:null!==t},style:{color:void 0!==this.color?`var(--rs-color-${this.color})`:""}},(0,i.h)("slot",{key:"a82d3d4145672252fca96c96ef4292922a0f3646"}))}get el(){return(0,i.g)(this)}};l.style="rs-label{display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:600;font-size:12px;color:var(--rs-color-grey);line-height:13px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;pointer-events:none;margin-bottom:5px}.item-has-focus rs-label{color:var(--rs-color-primary-700) !important}rs-label.label-floating{transform:translate3d(0, 32px, 0);transform-origin:left top;transition:transform 0.25s ease-in-out, font-size 0.25s ease-in-out;font-size:14px;font-weight:normal;padding-left:14px}.item-has-focus rs-label.label-floating,.item-has-value rs-label.label-floating{transform:translate3d(0, 0, 0);font-size:12px;font-weight:600}.item-has-max rs-label.label-fixed,.item-has-max rs-label.label-floating{position:absolute;top:0}.item-has-error rs-label{color:var(--rs-color-negative) !important}.item-input-has-start-slot rs-label.label-floating,.item-textarea-has-start-slot rs-label.label-floating{padding-left:38px}.item-input-has-start-slot.item-has-focus rs-label.label-floating,.item-input-has-start-slot.item-has-value rs-label.label-floating,.item-textarea-has-start-slot.item-has-focus rs-label.label-floating,.item-textarea-has-start-slot.item-has-value rs-label.label-floating{transform:translate3d(-22px, 0, 0);font-size:12px}";const h=class{constructor(t){(0,i.r)(this,t),this.toggle=(0,i.c)(this,"toggle",7),this.currentPosition=0,this.hasMovedActiveTab=!1,this.renderToggleBar=()=>{this.toggleItems=this.host.querySelectorAll("rs-toggle-item"),this.activeTabElement.style.width=`calc(${100/this.toggleItems.length}%)`,this.toggleItems.forEach(((t,e)=>{null!==t.getAttribute("active")&&this.moveActiveTab(e),t.addEventListener("click",(()=>{this.currentPosition!==e&&(this.moveActiveTab(e),this.removeAllActiveProp(),t.setAttribute("active","true"),this.emitToggleEvent())})),t.addEventListener("activeSet",(t=>{t.detail&&this.moveActiveTab(e)}))})),this.hasMovedActiveTab||this.moveActiveTab(0)}}async setActivePosition(t=0){this.removeAllActiveProp(),this.moveActiveTab(t),this.emitToggleEvent()}removeAllActiveProp(){this.toggleItems.forEach((t=>{t.removeAttribute("active")}))}moveActiveTab(t){this.activeTabElement.style.left=`calc(${100/this.toggleItems.length*t}%)`,this.currentPosition=t,this.hasMovedActiveTab=!0}emitToggleEvent(){this.toggle.emit({value:this.currentPosition,target:this.toggleItems[this.currentPosition]})}componentDidRender(){this.renderToggleBar()}render(){return(0,i.h)(i.H,{key:"cdbdd9f9c8418f51bd7409429a57f036e06ece61"},(0,i.h)("div",{key:"d614a83d569477128581b2e366c30de92faddac0",class:"toggle"},(0,i.h)("div",{key:"2f2b50e33c7da270bb2826325c4c5c6ed8fa00da",class:"toggle__items"},(0,i.h)("slot",{key:"8a675ed2c0e6558da3fdd3c149ff3df61c1df75d",onSlotchange:this.renderToggleBar}),(0,i.h)("div",{key:"e0b0d5d8a17106514f20c77aaa861b7f6b63fd9e",ref:t=>this.activeTabElement=t,class:"active-tab"}))))}get host(){return(0,i.g)(this)}};h.style=".toggle{display:block;padding:4px;background:var(--rs-color-select-background);box-shadow:inset 0 0 0 1px var(--rs-color-select-secondary);border-radius:4px;height:42px;box-sizing:border-box}.toggle__items{display:flex;flex-direction:row;position:relative;gap:4px}.active-tab{position:absolute;height:calc(100%);background:var(--rs-color-white);z-index:1;transition:left 0.15s ease-out;border-radius:2px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border), 0 1px 5px 0 rgb(195 213 226 / 0.62)}";const c=class{constructor(t){(0,i.r)(this,t),this.activeSet=(0,i.c)(this,"activeSet",7),this.active=!1}setActive(){this.activeSet.emit(this.active)}render(){return(0,i.h)(i.H,{key:"ea934495cbd83ebf06b2c0becc8db1a1f9ddd2f4",class:{active:this.active}},(0,i.h)("rs-content",{key:"127f1a8018cbdba9a91a90e2a5428dbe716aee70",body:2},(0,i.h)("slot",{key:"2c234c0a501c7d33cdf18aedf3d5cdc4cbc536e2"})))}get el(){return(0,i.g)(this)}static get watchers(){return{active:["setActive"]}}};c.style=":host{box-sizing:border-box;display:flex;padding:7px;text-align:center;z-index:2;cursor:pointer;user-select:none;flex:1 1 0;line-height:initial;justify-content:center;align-items:center;height:34px}:host(.active){cursor:default}"}}]);
|
|
13
13
|
//# sourceMappingURL=795.index.js.map
|
package/build/795.index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"795.index.js","mappings":";;;;;;;;;;;+MAMA,MAAMA,EAAW,CAACC,EAAMC,EAAO,KAC7B,IAAIC,EACJ,MAAO,IAAIC,KACTC,aAAaF,GACbA,EAAQG,WAAWL,EAAMC,KAASE,EAAK,CACxC,EAEGG,EAAY,CAACC,EAAIC,EAAYC,KACjC,MACMC,QADmBC,IAAdJ,EAAGK,OAAuBL,EAAGK,OAASH,GAC9BC,QAAQG,cAAcC,QAAQ,MAAO,IAClDC,EAAgBR,EAAGS,OACnBC,EAAY,CAAC,EACbC,EAAcV,EAAWW,IAAIT,IAAY,CAAC,EAChD,IAAIU,GAAiB,EACrBC,OAAOC,KAAKP,GAAeQ,SAAQC,IACjC,GAAIT,EAAcS,GAAM,CACtB,MAAMC,EAAU,QAAQD,IACnBN,EAAYO,KACfL,GAAiB,GAEnBH,EAAUQ,IAAW,CACvB,KAEGL,GAAkBC,OAAOC,KAAKL,GAAWS,SAAWL,OAAOC,KAAKJ,GAAaQ,SAChFN,GAAiB,GAEfA,IACFZ,EAAWmB,IAAIjB,EAASO,IACxB,IAAAW,GAAYnB,GACd,EAEIoB,EAAuB,CAACC,EAAkBC,EAAWC,EAAWC,GAAU,MAEzEF,IAAaC,GAAeC,GACN,OAArBH,IACFA,EAAiBI,MAAMC,QAAU,QACjC9B,YAAW,WACTyB,EAAiBI,MAAME,QAAU,GACnC,GAAG,KAEP,C,+NC3CF,MAAMC,EACJ,WAAAC,CAAYC,EAAQC,EAAQC,EAAS,MACnCC,KAA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AH,GAAE,MAAO,CAAEG,MAAO,kBAAmB,IAAAH,GAAE,OAAQ,CAAEmJ,aAAc3J,KAAK2I,mBAAoB,IAAAnI,GAAE,MAAO,CAAEC,IAAKC,GAAMV,KAAK+I,iBAAmBrI,EAAIC,MAAO,iBACvM,CACA,QAAIkI,GAAS,OAAO,IAAA5D,GAAWjF,KAAO,GAExCyI,EAAOjJ,MA5DW,kVA8DlB,MAEMoK,EAAa,MACjB,WAAAhK,CAAYoB,IACV,IAAAC,GAAiBjB,KAAMgB,GACvBhB,KAAK6J,QAAS,CAChB,CACA,MAAAvJ,GACE,OAAQ,IAAAE,GAAE,EAAA2C,EAAM,CAAExC,MAAO,CACrB,OAAUX,KAAK6J,UACZ,IAAArJ,GAAE,OAAQ,MACnB,CACA,MAAIE,GAAO,OAAO,IAAAuE,GAAWjF,KAAO,GAEtC4J,EAAWpK,MAdW,2R","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/helpers-11c1a06b.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-dropdown_5.entry.js"],"sourcesContent":["import { f as forceUpdate } from './index-3d0f28ab.js';\n\n/**\n * @param func\n * @param wait\n */\nconst debounce = (func, wait = 0) => {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\nconst itemStyle = (ev, itemStyles, element) => {\n const el = ev.target !== undefined ? ev.target : element;\n const tagName = el.tagName.toLowerCase().replace('rs-', '');\n const updatedStyles = ev.detail;\n const newStyles = {};\n const childStyles = itemStyles.get(tagName) || {};\n let hasStyleChange = false;\n Object.keys(updatedStyles).forEach(key => {\n if (updatedStyles[key]) {\n const itemKey = `item-${key}`;\n if (!childStyles[itemKey]) {\n hasStyleChange = true;\n }\n newStyles[itemKey] = true;\n }\n });\n if (!hasStyleChange && Object.keys(newStyles).length !== Object.keys(childStyles).length) {\n hasStyleChange = true;\n }\n if (hasStyleChange) {\n itemStyles.set(tagName, newStyles);\n forceUpdate(element);\n }\n};\nconst showCharacterCounter = (maxLengthElement, hardLimit, softLimit, hideMax = false) => {\n // show only if soft limit or hard limit is set and if the element has been rendered\n if ((hardLimit || softLimit) && !hideMax) {\n if (maxLengthElement !== null) {\n maxLengthElement.style.display = 'block';\n setTimeout(function () {\n maxLengthElement.style.opacity = '1';\n }, 150);\n }\n }\n};\n\nexport { debounce as d, itemStyle as i, showCharacterCounter as s };\n\n//# sourceMappingURL=helpers-11c1a06b.js.map","import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, f as forceUpdate } from './index-3d0f28ab.js';\nimport { s as showCharacterCounter } from './helpers-11c1a06b.js';\n\nclass Item {\n constructor(_value, _label, _style = null) {\n this._value = _value;\n this._label = _label;\n this._style = _style;\n this.onClick = (callback) => () => {\n callback(this);\n };\n }\n element() {\n return this._el;\n }\n value() {\n return this._value;\n }\n label() {\n return this._label;\n }\n render(callback, selectedItem) {\n return h(\"div\", { key: this.value(), ref: el => this._el = el, class: {\n 'dropdown__item': true,\n 'dropdown__item--selected': selectedItem,\n }, \"data-value\": this.value(), onClick: this.onClick(callback) },\n h(\"rs-caption\", { style: Object.assign(Object.assign({}, this._style), { overflow: 'hidden', textOverflow: 'ellipsis' }) }, this._label));\n }\n}\n\nconst rsDropdownCss = \"*{box-sizing:border-box;margin:0}.container{--rs-dropdown-selected-container-height:0;position:relative;width:100%}.selected__container{position:relative;display:flex;justify-content:space-between;align-items:center;height:var(--rs-dropdown-selected-container-height);border-radius:4px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border);cursor:pointer}.is-small .selected__container{background:var(--rs-color-white);padding:8px 12px}.is-large .selected__container{background:var(--rs-color-select-background);padding:12px}.is-open .selected__container{border-radius:4px 4px 0 0}:host(:focus) .selected__container,:host(:active) .selected__container{box-shadow:inset 0 0 0 1px #b7b7b7}.dropdown__selected{white-space:nowrap;width:100%;overflow:hidden}.selected__container::after{content:'';position:absolute;top:calc(50% - 2.5px);right:12px;border-style:solid;border-color:#333 var(--rs-color-transparent) var(--rs-color-transparent);border-width:5px}.selected__container::before{content:\\\"\\\";background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%);position:absolute;width:31px;right:1px;top:1px;bottom:1px;border-radius:4px}.dropdown__container{position:absolute;top:calc(var(--rs-dropdown-selected-container-height) - 1px);display:none;min-width:100%;width:min-content;white-space:nowrap;overflow:hidden;background:var(--rs-color-white);border:solid 1px #b7b7b7;border-radius:0 0 4px 4px}.is-open .dropdown__container{display:block;z-index:1}.dropdown__search{border-bottom:1px solid #ddd}.dropdown__search input{width:100%;padding:10px;border:none;color:var(--rs-color-black);font-family:Soleil, sans-serif;outline:none;appearance:none}.dropdown__action{width:100%;padding:16px;border-bottom:1px solid #ddd}.dropdown__action:hover{background-color:var(--rs-color-light)}.dropdown__items{overflow:hidden auto}.dropdown__item{padding:10px;cursor:pointer}.dropdown__item--selected,.dropdown__item:hover{background-color:var(--rs-color-light)}.dropdown__item--no-results{cursor:default}.dropdown__item--no-results:hover{background-color:initial}\";\n\nconst RsDropdown = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsChange = createEvent(this, \"rsChange\", 7);\n this.showDropdown = createEvent(this, \"showDropdown\", 7);\n this.hideDropdown = createEvent(this, \"hideDropdown\", 7);\n this.toggleDropdown = () => {\n var _a, _b;\n if (this._items.length === 0 && !this.hasActionTop) {\n return;\n }\n this.$container.classList.toggle('is-open');\n if (this.$container.classList.contains('is-open')) {\n this.showDropdown.emit();\n this.$itemContainer.scrollTop = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.element().offsetTop) - this.$itemContainer.offsetTop - ((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.element().offsetHeight);\n }\n else {\n this.hideDropdown.emit();\n }\n };\n this.filterItems = (e) => {\n this.filterText = e.target.value;\n };\n this.selectItem = (item) => {\n this.selectedItem = item;\n this.value = item.value();\n this.closeDropdown();\n this.rsChange.emit(item.value());\n };\n this.value = null;\n this.items = [];\n this.type = 'selectOne';\n this.size = 'large';\n this.maxHeight = '300px';\n this.searchable = false;\n this.placeholder = 'Choose an option';\n this.selectedIndex = null;\n this.maxWidth = null;\n this._items = undefined;\n this.selectedItem = null;\n this.filterText = '';\n }\n async clear() {\n this.selectedItem = null;\n }\n render() {\n return h(Host, { tabindex: 0 }, h(\"div\", { class: `container is-${this.size}`, ref: el => this.$container = el }, h(\"div\", { class: \"selected__container\", onClick: this.toggleDropdown }, this.renderSelected()), h(\"div\", { class: \"dropdown__container\", style: {\n maxWidth: this.maxWidth,\n } }, this.searchable ? this.renderSearch() : null, this.hasActionTop ? this.renderAction('top') : null, h(\"div\", { class: \"dropdown__items\", ref: el => this.$itemContainer = el, style: {\n maxHeight: this.maxHeight,\n } }, this.renderItems()))));\n }\n componentWillLoad() {\n this.hasActionTop = !!this.el.querySelector('[slot=\"action-top\"]');\n }\n componentWillRender() {\n var _a, _b, _c;\n let items;\n if (typeof this.items === 'string') {\n items = JSON.parse(this.items);\n }\n else {\n items = this.items;\n }\n this._items = items.map((item) => new Item(item.value, item.label, item.style));\n if (this.selectedItem === null && this.selectedIndex !== null) {\n this.selectedItem = (_a = this._items[this.selectedIndex]) !== null && _a !== void 0 ? _a : null;\n }\n if (this.value !== null) {\n const selected = (_b = this._items.find((item) => item.value() === this.value)) !== null && _b !== void 0 ? _b : null;\n if (((_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.value()) !== (selected === null || selected === void 0 ? void 0 : selected.value())) {\n this.selectedItem = selected;\n }\n }\n }\n componentDidLoad() {\n window.addEventListener('mousedown', (e) => {\n if (e.composedPath().includes(this.el)) {\n return;\n }\n this.closeDropdown();\n });\n if (this.size === 'large') {\n this.$container.style.setProperty('--rs-dropdown-selected-container-height', '42px');\n }\n if (this.size === 'small') {\n this.$container.style.setProperty('--rs-dropdown-selected-container-height', '32px');\n }\n }\n renderSelected() {\n var _a, _b;\n const content = (_b = (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.label()) !== null && _b !== void 0 ? _b : this.placeholder;\n if (this.size === 'large') {\n return h(\"rs-content\", { class: \"dropdown__selected\", body: 2 }, content);\n }\n if (this.size === 'small') {\n return h(\"rs-caption\", { class: \"dropdown__selected\" }, content);\n }\n throw new Error(`Invalid size ${this.size}`);\n }\n renderItems() {\n if (this._items.length === 0) {\n return null;\n }\n const filtered = this._items\n .filter((item) => item.label().toLowerCase().includes(this.filterText.toLowerCase()));\n if (filtered.length === 0) {\n return h(\"div\", { class: \"dropdown__item dropdown__item--no-results\" }, \"No results found\");\n }\n return filtered.map((item) => { var _a; return item.render(this.selectItem, item.value() === ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value())); });\n }\n renderSearch() {\n return h(\"div\", { class: \"dropdown__search\" }, h(\"input\", { type: \"text\", onInput: this.filterItems }));\n }\n renderAction(position) {\n return h(\"div\", { class: `dropdown__action dropdown__action--${position}` }, h(\"slot\", { name: `action-${position}` }));\n }\n closeDropdown() {\n this.$container.classList.remove('is-open');\n }\n get el() { return getElement(this); }\n};\nRsDropdown.style = rsDropdownCss;\n\nconst inputCss = \".sc-rs-input-h{display:block;position:static;width:100%;padding:0}.rs-input__inner.sc-rs-input{display:flex;align-items:center;justify-content:flex-start;width:100%;height:42px;box-shadow:none;background:var(--rs-color-light);border:none;box-sizing:border-box;border-radius:4px;padding:11px 14px;transition:box-shadow .15s ease-out, background-color .15s ease-out}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input{height:32px;padding:8px}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{padding:0 0 2px 0}.text-align-center.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:center}.text-align-right.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:right}.text-align-left.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:left}.native-input.sc-rs-input,.native-input.sc-rs-input:focus{border:none;background-image:none;background-color:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-appearance:none;outline:none;height:100%;width:100%;display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:14px;line-height:140%;color:var(--rs-color-heading);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;resize:none;padding:0}.native-input.sc-rs-input::placeholder{color:var(--rs-color-grey);font-family:Soleil, sans-serif;font-style:normal;font-weight:normal}.native-input[disabled].sc-rs-input{opacity:0.4}.has-value.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-primary);background-color:var(--rs-color-white);color:var(--rs-color-heading);outline:none;pointer-events:auto;opacity:1}.has-error.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-error.sc-rs-input-h:not(.has-focus) .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-grey)}.has-value.sc-rs-input-h:not(.has-focus) .max-length.sc-rs-input{display:block;opacity:1;color:var(--rs-color-grey-light)}.sc-rs-input-h .max-length.sc-rs-input{font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:12px;line-height:13px;text-align:right;color:var(--rs-color-grey);display:none;opacity:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:5px;transition:opacity .15s ease-out, color .15s ease-out}.chars-over-max.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-negative)}.sc-rs-input-s>[slot=\\\"start\\\"]{margin-right:10px}.sc-rs-input-s>[slot=\\\"end\\\"]{margin-left:10px}\";\n\nconst Input = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsInput = createEvent(this, \"rsInput\", 7);\n this.rsInputChanged = createEvent(this, \"rsInputChanged\", 7);\n this.rsInputNoFocus = createEvent(this, \"rsInputNoFocus\", 7);\n this.rsInputFocus = createEvent(this, \"rsInputFocus\", 7);\n this.rsItem = createEvent(this, \"rsItem\", 7);\n this.didBlurAfterEdit = false;\n this.hasStartSlot = false;\n this.hasEndSlot = false;\n /**\n * The function which gets called when user enters something in the input field\n * @param ev - event\n */\n this.onInput = (ev) => {\n const input = ev.target;\n if (input !== null) {\n this.value = input.value || '';\n }\n this.rsInput.emit(ev);\n };\n /**\n * The function which gets called when input is in focus\n */\n this.onFocus = () => {\n this.hasFocus = true; // this element has focus now\n this.focusChanged();\n this.emitRsItem(); // emit change in style - should have the primary color when on focus\n this.rsInputFocus.emit(); // emit input focus event\n };\n /**\n * The function which gets called when focus on the input changes\n */\n this.focusChanged = () => {\n if (!this.hasFocus && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n };\n /**\n * The function which gets called id we want to clear value on edit\n */\n this.shouldClearOnEdit = () => {\n const { type, clearOnEdit } = this;\n return (clearOnEdit === undefined) ? type === 'password' : clearOnEdit;\n };\n /**\n * The function which gets called when the user presses a key\n */\n this.onKeyDown = () => {\n if (this.shouldClearOnEdit()) {\n // Did the input value change after it was blurred and edited\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.clearTextInput();\n }\n }\n this.didBlurAfterEdit = false;\n };\n /**\n * The function which gets called when we want to clear the value\n */\n this.clearTextInput = (ev) => {\n if (this.clearInput !== undefined &&\n !this.readonly &&\n !this.disabled &&\n ev !== undefined) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n this.value = '';\n /**\n * This is needed for clearOnEdit\n * Otherwise the value will not be cleared\n * if user is inside the input\n */\n if (this.nativeElement !== null) {\n this.nativeElement.value = '';\n }\n };\n /**\n * The function which gets called when input gets out of focus\n */\n this.onBlur = () => {\n this.hasFocus = false;\n this.focusChanged();\n this.emitRsItem();\n this.rsInputNoFocus.emit();\n };\n this.hasFocus = false;\n this.charsLeft = 0;\n this.type = 'text';\n this.value = '';\n this.disabled = false;\n this.readonly = false;\n this.placeholder = undefined;\n this.clearOnEdit = false;\n this.clearInput = false;\n this.required = false;\n this.hideMax = false;\n this.hardLimit = null;\n this.softLimit = null;\n this.name = undefined;\n this.hasError = false;\n this.textAlign = 'left';\n this.size = 'default';\n }\n /**\n * Watch for any changes on the `disabled` property.\n */\n disabledChanged() {\n this.emitRsItem(); // disabled changed, emit change in styling\n }\n /**\n * Watch for any changes on the `value` property.\n */\n valueChanged() {\n this.emitRsItem(); // value changed, emit change in styling\n this.changeMaxLengthText();\n this.rsInputChanged.emit({ value: this.value == null ? this.value : this.value.toString() }); // emit change in input\n }\n hasErrorChanged() {\n this.emitRsItem();\n }\n /**\n * A method for re-rendering the input component\n */\n async update() {\n forceUpdate(this.el);\n }\n /**\n * A method for setting focus on the specified input field.\n */\n async setFocus() {\n if (this.nativeElement !== null) {\n this.nativeElement.focus(); // set focus\n }\n }\n /**\n * A method for getting the native `<input>` element used\n */\n getInputElement() {\n return Promise.resolve(this.nativeElement);\n }\n /**\n * Get the input's value\n */\n getValue() {\n return this.value || '';\n }\n /**\n * Check if the input has value\n */\n hasValue() {\n return this.getValue().length > 0;\n }\n /**\n * Emits `rsItem` event when the styles of the input change\n */\n emitRsItem() {\n this.rsItem.emit({\n 'input': true,\n 'interactive': true,\n 'has-focus': this.hasFocus,\n 'has-value': this.hasValue(),\n 'has-placeholder': this.placeholder !== null,\n 'has-error': this.hasError,\n 'has-max': this.hardLimit !== null || this.softLimit !== null,\n 'hide-max': this.hideMax,\n 'interactive-disabled': this.disabled,\n 'input-has-start-slot': this.hasStartSlot,\n 'input-has-end-slot': this.hasEndSlot,\n 'input-chars-over-max': this.charsLeft < 0,\n 'input-is-required': this.required\n });\n }\n /**\n * As the user types something in the input field, if soft max is set, then we show a character counter above the input field.\n * This function is for updating the text above the input field.\n */\n changeMaxLengthText() {\n if ((this.softLimit !== null && this.softLimit > 0) && !this.hideMax) {\n const valueLength = this.value.length; // the number of characters the user entered\n this.charsLeft = this.softLimit - valueLength;\n const maxLengthText = this.el.querySelector('.max-length');\n if (maxLengthText !== null) {\n // if no. of characters entered by the user is over the set max characters\n if (this.charsLeft < 0) {\n maxLengthText.innerHTML = `${Math.abs(this.charsLeft)} over`;\n this.el.classList.add('input-chars-over-max');\n // if no. of characters entered by the user is NOT over the set max character\n }\n else {\n maxLengthText.innerHTML = `${this.charsLeft} left`;\n this.el.classList.remove('input-chars-over-max');\n }\n }\n }\n }\n /**\n * This gets called once just after the component gets fully loaded\n * and after the first render occurred.\n */\n componentDidLoad() {\n if ((this.softLimit !== undefined || this.hardLimit !== undefined)) {\n const maxLength = this.el.querySelector('.max-length');\n showCharacterCounter(maxLength, this.hardLimit, this.softLimit, this.hideMax);\n this.changeMaxLengthText(); // the char count should reflect the initial value's char count\n }\n }\n connectedCallback() {\n this.hasStartSlot = this.el.querySelector('[slot=\"start\"]') !== null;\n this.hasEndSlot = this.el.querySelector('[slot=\"end\"]') !== null;\n this.emitRsItem();\n }\n /**\n * This renders the component\n */\n render() {\n const value = this.getValue();\n let maxLengthText = null;\n if ((this.hardLimit || this.softLimit) && !this.hideMax) {\n const maxLength = this.hardLimit || this.softLimit;\n maxLengthText = (h(\"span\", { class: \"max-length\" }, maxLength, \" max\"));\n }\n return (h(Host, { class: {\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus,\n 'has-placeholder': this.placeholder !== null,\n 'has-max': this.hardLimit !== null || this.softLimit !== null,\n 'hide-max': this.hideMax,\n 'chars-over-max': this.charsLeft < 0,\n 'has-error': this.hasError,\n [`text-align-${this.textAlign}`]: true,\n [`size-${this.size}`]: true\n } }, maxLengthText, h(\"div\", { class: \"rs-input__inner\" }, h(\"slot\", { name: \"start\" }), h(\"input\", { class: \"native-input\", ref: input => this.nativeElement = input, disabled: this.disabled, readonly: this.readonly, onInput: this.onInput, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, placeholder: this.placeholder, type: this.type, required: this.required, name: this.name, maxlength: this.hardLimit, value: value }), h(\"slot\", { name: \"end\" }))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"disabled\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"],\n \"hasError\": [\"hasErrorChanged\"]\n }; }\n};\nInput.style = inputCss;\n\nconst labelCss = \"rs-label{display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:600;font-size:12px;color:var(--rs-color-grey);line-height:13px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;pointer-events:none;margin-bottom:5px}.item-has-focus rs-label{color:var(--rs-color-primary-700) !important}rs-label.label-floating{transform:translate3d(0, 32px, 0);transform-origin:left top;transition:transform 0.25s ease-in-out, font-size 0.25s ease-in-out;font-size:14px;font-weight:normal;padding-left:14px}.item-has-focus rs-label.label-floating,.item-has-value rs-label.label-floating{transform:translate3d(0, 0, 0);font-size:12px;font-weight:600}.item-has-max rs-label.label-fixed,.item-has-max rs-label.label-floating{position:absolute;top:0}.item-has-error rs-label{color:var(--rs-color-negative) !important}.item-input-has-start-slot rs-label.label-floating,.item-textarea-has-start-slot rs-label.label-floating{padding-left:38px}.item-input-has-start-slot.item-has-focus rs-label.label-floating,.item-input-has-start-slot.item-has-value rs-label.label-floating,.item-textarea-has-start-slot.item-has-focus rs-label.label-floating,.item-textarea-has-start-slot.item-has-value rs-label.label-floating{transform:translate3d(-22px, 0, 0);font-size:12px}\";\n\nconst Label = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsItem = createEvent(this, \"rsItem\", 7);\n this.color = 'grey';\n this.position = 'floating';\n }\n emitRsItem() {\n this.rsItem.emit({\n [`label-${this.position}`]: this.position !== null,\n 'has-label': true\n });\n }\n /**\n * This renders the component\n */\n render() {\n const position = this.position;\n this.emitRsItem();\n return (h(Host, { class: {\n [`label-${position}`]: position !== null,\n }, style: {\n color: this.color !== undefined ? `var(--rs-color-${this.color})` : ''\n } }, h(\"slot\", null)));\n }\n get el() { return getElement(this); }\n};\nLabel.style = labelCss;\n\nconst toggleCss = \".toggle{display:block;padding:4px;border-radius:7px;background:var(--rs-color-light)}.toggle__items{display:flex;flex-direction:row;position:relative}.active-tab{position:absolute;height:calc(100%);border-radius:4px;background:var(--rs-color-white);box-shadow:0 1px 5px rgb(195 213 226 / 0.62);z-index:1;transition:left 0.15s ease-out}\";\n\nconst Toggle = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.toggle = createEvent(this, \"toggle\", 7);\n this.hasMovedActiveTab = false;\n this.renderToggleBar = () => {\n this.toggleItems = this.host.querySelectorAll('rs-toggle-item');\n this.activeTabElement.style.width = `calc(${(100 / this.toggleItems.length)}%)`;\n this.toggleItems.forEach((item, position) => {\n if (item.getAttribute('active') !== null) {\n this.moveActiveTab(position);\n }\n item.addEventListener('click', () => {\n if (this.currentPosition === position) {\n return;\n }\n this.moveActiveTab(position);\n this.removeAllActiveProp();\n item.setAttribute('active', 'true');\n this.emitToggleEvent();\n });\n });\n if (!this.hasMovedActiveTab) {\n this.moveActiveTab(0);\n }\n };\n this.currentPosition = 0;\n }\n /**\n * Set the current active state of the toggle\n * @param {number} position\n */\n async setActivePosition(position = 0) {\n this.removeAllActiveProp();\n this.moveActiveTab(position);\n this.emitToggleEvent();\n }\n removeAllActiveProp() {\n this.toggleItems.forEach(item => {\n item.removeAttribute('active');\n });\n }\n moveActiveTab(position) {\n this.activeTabElement.style.left = `calc(${(100 / this.toggleItems.length * position)}%)`;\n this.currentPosition = position;\n this.hasMovedActiveTab = true;\n }\n emitToggleEvent() {\n this.toggle.emit({ value: this.currentPosition, target: this.toggleItems[this.currentPosition] });\n }\n componentDidRender() {\n this.renderToggleBar();\n }\n render() {\n return (h(Host, null, h(\"div\", { class: 'toggle' }, h(\"div\", { class: 'toggle__items' }, h(\"slot\", { onSlotchange: this.renderToggleBar }), h(\"div\", { ref: el => this.activeTabElement = el, class: 'active-tab' })))));\n }\n get host() { return getElement(this); }\n};\nToggle.style = toggleCss;\n\nconst toggleItemCss = \":host{box-sizing:border-box;display:block;padding:7px;text-align:center;z-index:2;cursor:pointer;color:var(--rs-color-secondary);font-family:Soleil, sans-serif;font-size:14px;user-select:none;flex-grow:1;flex-shrink:1;flex-basis:0;line-height:initial}:host(.active){cursor:default}\";\n\nconst ToggleItem = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.active = false;\n }\n render() {\n return (h(Host, { class: {\n 'active': this.active\n } }, h(\"slot\", null)));\n }\n get el() { return getElement(this); }\n};\nToggleItem.style = toggleItemCss;\n\nexport { RsDropdown as rs_dropdown, Input as rs_input, Label as rs_label, Toggle as rs_toggle, ToggleItem as rs_toggle_item };\n\n//# sourceMappingURL=rs-dropdown_5.entry.js.map"],"names":["debounce","func","wait","timer","args","clearTimeout","setTimeout","itemStyle","ev","itemStyles","element","tagName","undefined","target","toLowerCase","replace","updatedStyles","detail","newStyles","childStyles","get","hasStyleChange","Object","keys","forEach","key","itemKey","length","set","f","showCharacterCounter","maxLengthElement","hardLimit","softLimit","hideMax","style","display","opacity","Item","constructor","_value","_label","_style","this","onClick","callback","_el","value","label","render","selectedItem","h","ref","el","class","assign","overflow","textOverflow","RsDropdown","hostRef","r","rsChange","c","showDropdown","hideDropdown","toggleDropdown","_a","_b","_items","hasActionTop","$container","classList","toggle","contains","emit","$itemContainer","scrollTop","offsetTop","offsetHeight","filterItems","e","filterText","selectItem","item","closeDropdown","items","type","size","maxHeight","searchable","placeholder","selectedIndex","maxWidth","clear","H","tabindex","renderSelected","renderSearch","renderAction","renderItems","componentWillLoad","querySelector","componentWillRender","_c","JSON","parse","map","selected","find","componentDidLoad","window","addEventListener","composedPath","includes","setProperty","content","body","Error","filtered","filter","onInput","position","name","remove","g","Input","rsInput","rsInputChanged","rsInputNoFocus","rsInputFocus","rsItem","didBlurAfterEdit","hasStartSlot","hasEndSlot","input","onFocus","hasFocus","focusChanged","emitRsItem","hasValue","shouldClearOnEdit","clearOnEdit","onKeyDown","clearTextInput","clearInput","readonly","disabled","preventDefault","stopPropagation","nativeElement","onBlur","charsLeft","required","hasError","textAlign","disabledChanged","valueChanged","changeMaxLengthText","toString","hasErrorChanged","update","setFocus","focus","getInputElement","Promise","resolve","getValue","valueLength","maxLengthText","innerHTML","Math","abs","add","maxLength","s","connectedCallback","maxlength","watchers","Label","color","Toggle","hasMovedActiveTab","renderToggleBar","toggleItems","host","querySelectorAll","activeTabElement","width","getAttribute","moveActiveTab","currentPosition","removeAllActiveProp","setAttribute","emitToggleEvent","setActivePosition","removeAttribute","left","componentDidRender","onSlotchange","ToggleItem","active"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"795.index.js","mappings":";;;;;;;;;;;+MAMA,MAAMA,EAAW,CAACC,EAAMC,EAAO,KAC3B,IAAIC,EACJ,MAAO,IAAIC,KACPC,aAAaF,GACbA,EAAQG,WAAWL,EAAMC,KAASE,EAAK,CAC1C,EAECG,EAAY,CAACC,EAAIC,EAAYC,KAC/B,MACMC,QADmBC,IAAdJ,EAAGK,OAAuBL,EAAGK,OAASH,GAC9BC,QAAQG,cAAcC,QAAQ,MAAO,IAClDC,EAAgBR,EAAGS,OACnBC,EAAY,CAAC,EACbC,EAAcV,EAAWW,IAAIT,IAAY,CAAC,EAChD,IAAIU,GAAiB,EACrBC,OAAOC,KAAKP,GAAeQ,SAAQC,IAC/B,GAAIT,EAAcS,GAAM,CACpB,MAAMC,EAAU,QAAQD,IACnBN,EAAYO,KACbL,GAAiB,GAErBH,EAAUQ,IAAW,CACzB,KAECL,GAAkBC,OAAOC,KAAKL,GAAWS,SAAWL,OAAOC,KAAKJ,GAAaQ,SAC9EN,GAAiB,GAEjBA,IACAZ,EAAWmB,IAAIjB,EAASO,IACxB,IAAAW,GAAYnB,GAChB,EAEEoB,EAAuB,CAACC,EAAkBC,EAAWC,EAAWC,GAAU,MAEvEF,IAAaC,GAAeC,GACJ,OAArBH,IACAA,EAAiBI,MAAMC,QAAU,QACjC9B,YAAW,WACPy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,CAAE1B,IAAK,2CAA4C+B,IAAKC,GAAMb,KAAKkK,iBAAmBrJ,EAAIL,MAAO,iBAC5b,CACA,QAAIwJ,GAAS,OAAO,IAAApE,GAAW5F,KAAO,GAE1C2J,EAAOpK,MAjEW,qfAmElB,MAGMuL,EAAa,MACf,WAAAnL,CAAYyB,IACR,IAAAC,GAAiBrB,KAAMoB,GACvBpB,KAAK+K,WAAY,IAAAxJ,GAAYvB,KAAM,YAAa,GAIhDA,KAAKgL,QAAS,CAClB,CACA,SAAAC,GACIjL,KAAK+K,UAAUlI,KAAK7C,KAAKgL,OAC7B,CACA,MAAAvK,GACI,OAAQ,IAAAF,GAAE,EAAAqD,EAAM,CAAE/E,IAAK,2CAA4C2B,MAAO,CAClE,OAAUR,KAAKgL,UACd,IAAAzK,GAAE,aAAc,CAAE1B,IAAK,2CAA4CuG,KAAM,IAAK,IAAA7E,GAAE,OAAQ,CAAE1B,IAAK,8CAC5G,CACA,MAAIgC,GAAO,OAAO,IAAA+E,GAAW5F,KAAO,CACpC,mBAAWwJ,GAAa,MAAO,CAC3B,OAAU,CAAC,aACZ,GAEPsB,EAAWvL,MAzBW,sO","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/helpers-16362640.js","webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-dropdown_5.entry.js"],"sourcesContent":["import { f as forceUpdate } from './index-def1ecaa.js';\n\n/**\n * @param func\n * @param wait\n */\nconst debounce = (func, wait = 0) => {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\nconst itemStyle = (ev, itemStyles, element) => {\n const el = ev.target !== undefined ? ev.target : element;\n const tagName = el.tagName.toLowerCase().replace('rs-', '');\n const updatedStyles = ev.detail;\n const newStyles = {};\n const childStyles = itemStyles.get(tagName) || {};\n let hasStyleChange = false;\n Object.keys(updatedStyles).forEach(key => {\n if (updatedStyles[key]) {\n const itemKey = `item-${key}`;\n if (!childStyles[itemKey]) {\n hasStyleChange = true;\n }\n newStyles[itemKey] = true;\n }\n });\n if (!hasStyleChange && Object.keys(newStyles).length !== Object.keys(childStyles).length) {\n hasStyleChange = true;\n }\n if (hasStyleChange) {\n itemStyles.set(tagName, newStyles);\n forceUpdate(element);\n }\n};\nconst showCharacterCounter = (maxLengthElement, hardLimit, softLimit, hideMax = false) => {\n // show only if soft limit or hard limit is set and if the element has been rendered\n if ((hardLimit || softLimit) && !hideMax) {\n if (maxLengthElement !== null) {\n maxLengthElement.style.display = 'block';\n setTimeout(function () {\n maxLengthElement.style.opacity = '1';\n }, 150);\n }\n }\n};\n\nexport { debounce as d, itemStyle as i, showCharacterCounter as s };\n\n//# sourceMappingURL=helpers-16362640.js.map","import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, f as forceUpdate } from './index-def1ecaa.js';\nimport { s as showCharacterCounter } from './helpers-16362640.js';\n\nclass Item {\n constructor(_value, _label, _style = null, _prefix = '') {\n this._value = _value;\n this._label = _label;\n this._style = _style;\n this._prefix = _prefix;\n this.onClick = (callback) => () => {\n callback(this);\n };\n }\n element() {\n return this._el;\n }\n value() {\n return this._value;\n }\n label() {\n return this._label;\n }\n prefixDisplay() {\n return this._prefix !== '' ? h(\"span\", { class: \"dropdown__prefix\" },\n \" \",\n this._prefix,\n \" / \") : '';\n }\n render(callback, selectedItem, isSelectMany) {\n return h(\"div\", { key: this.value(), ref: el => this._el = el, class: {\n 'dropdown__item': true,\n 'dropdown__item--selected': selectedItem,\n 'dropdown__item--select-many': isSelectMany,\n }, \"data-value\": this.value(), onClick: this.onClick(callback) }, isSelectMany ? (h(\"rs-checkbox\", { checked: selectedItem, style: {\n pointerEvents: 'none',\n } },\n this.prefixDisplay(),\n \" \",\n this._label)) : (h(\"rs-caption\", { style: Object.assign(Object.assign({}, this._style), { overflow: 'hidden', textOverflow: 'ellipsis' }) },\n this.prefixDisplay(),\n this._label)));\n }\n}\n\nconst rsDropdownCss = \"*{box-sizing:border-box;margin:0}.container{--rs-dropdown-selected-container-height:0;position:relative;width:100%}.selected__container{position:relative;display:flex;justify-content:space-between;align-items:center;height:var(--rs-dropdown-selected-container-height);border-radius:4px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border);background:var(--rs-color-white);cursor:pointer}.is-small .selected__container{padding:8px 12px}.is-large .selected__container{padding:12px}.is-open .selected__container{border-radius:4px 4px 0 0}:host(:focus) .selected__container,:host(:active) .selected__container{box-shadow:inset 0 0 0 1px #b7b7b7}.dropdown__selected{white-space:nowrap;width:100%;overflow:hidden}.selected__container::after{content:'';position:absolute;top:calc(50% - 2.5px);right:12px;border-style:solid;border-color:#333 var(--rs-color-transparent) var(--rs-color-transparent);border-width:5px}.selected__container::before{content:\\\"\\\";position:absolute;width:31px;right:1px;top:1px;bottom:1px;border-radius:4px}.dropdown__prefix{color:var(--rs-color-grey-300)}.is-large .selected__container::before{background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%)}.is-small .selected__container::before{background:linear-gradient(90deg, rgb(255 255 255 / 0) 0%, white 40%)}.dropdown__container{position:absolute;top:calc(var(--rs-dropdown-selected-container-height) - 1px);display:none;min-width:100%;width:min-content;white-space:nowrap;overflow:hidden;background:var(--rs-color-white);border:solid 1px #b7b7b7;border-radius:0 0 4px 4px}.is-open .dropdown__container{display:block;z-index:1}.dropdown__search{border-bottom:1px solid #ddd;position:relative}.dropdown__search-icon{position:absolute;top:50%;left:12px;transform:translateY(-50%);color:var(--rs-color-grey-300);z-index:1}.dropdown__search input{width:100%;padding:10px 10px 10px 40px;border:none;color:var(--rs-color-black);font-family:Soleil, sans-serif;outline:none;appearance:none}.dropdown__action{width:100%;padding:16px;border-bottom:1px solid #ddd}.dropdown__action:hover{background-color:var(--rs-color-light)}.dropdown__items{overflow:hidden auto}.dropdown__item{padding:10px;cursor:pointer}.dropdown__item--selected:not(.dropdown__item--select-many),.dropdown__item:hover{background-color:var(--rs-color-light)}.dropdown__item--no-results{cursor:default}.dropdown__item--no-results:hover{background-color:initial}\";\nconst RsDropdownStyle0 = rsDropdownCss;\n\nconst RsDropdown = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsChange = createEvent(this, \"rsChange\", 7);\n this.showDropdown = createEvent(this, \"showDropdown\", 7);\n this.hideDropdown = createEvent(this, \"hideDropdown\", 7);\n /**\n * The value of the selected items value key\n */\n this.value = null;\n /**\n * The items to display in the dropdown\n */\n this.items = [];\n /**\n * The type of dropdown to display\n */\n this.type = 'selectOne';\n /**\n * The size of the dropdown\n */\n this.size = 'large';\n /**\n * The max height of the dropdown items container\n */\n this.maxHeight = '300px';\n /**\n * Whether the dropdown is searchable\n */\n this.searchable = false;\n /**\n * The default text to display when a dropdown is rendered\n */\n this.placeholder = 'Choose an option';\n /**\n * If set, selects the corresponding item by default\n */\n this.selectedIndex = null;\n /**\n * If set, sets the max width of the dropdown container, px or % value\n */\n this.maxWidth = null;\n this.selectedItem = null;\n this.selectedItems = [];\n this.filterText = '';\n this.toggleDropdown = () => {\n var _a, _b;\n if (this._items.length === 0 && !this.hasActionTop) {\n return;\n }\n this.$container.classList.toggle('is-open');\n if (this.$container.classList.contains('is-open')) {\n this.showDropdown.emit();\n this.$itemContainer.scrollTop = ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.element().offsetTop) - this.$itemContainer.offsetTop - ((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.element().offsetHeight);\n }\n else {\n this.hideDropdown.emit();\n }\n };\n this.filterItems = (e) => {\n this.filterText = e.target.value;\n };\n this.selectItem = (item) => {\n if (this.type === 'selectOne') {\n this.selectedItem = item;\n this.value = item.value();\n this.closeDropdown();\n this.rsChange.emit(item.value());\n }\n else if (this.type === 'selectMany') {\n if (this.selectedItems.some((selected) => selected.value() == item.value())) {\n this.selectedItems = this.selectedItems.filter((selected) => selected.value() != item.value());\n this.value = null;\n this.rsChange.emit(this.selectedItems.map((item) => item.value()));\n }\n else {\n this.selectedItems = [...this.selectedItems, item]; // Can't use .push() or rerender won't happen\n this.value = null;\n this.rsChange.emit(this.selectedItems.map((item) => item.value()));\n }\n }\n };\n }\n async clear() {\n this.selectedItem = null;\n this.selectedItems = [];\n }\n render() {\n return h(Host, { key: '453ebe995d8af778d3e00d69e16f611485190817', tabindex: 0 }, h(\"div\", { key: '99cc4e291745a53cc6bfec98512bd26e31ded81a', class: `container is-${this.size}`, ref: el => this.$container = el }, h(\"div\", { key: '4ca92a7f28d201c34c1327f8afef34b4db1318a3', class: \"selected__container\", onClick: this.toggleDropdown }, this.renderSelected()), h(\"div\", { key: 'ad7370913dc6371935905c030a72ed81180b3eed', class: \"dropdown__container\", style: {\n maxWidth: this.maxWidth,\n } }, this.searchable ? this.renderSearch() : null, this.hasActionTop ? this.renderAction('top') : null, h(\"div\", { key: '5508779a331e8cf3345f9891f4e460dc6b835e7c', class: \"dropdown__items\", ref: el => this.$itemContainer = el, style: {\n maxHeight: this.maxHeight,\n } }, this.renderItems()))));\n }\n componentWillLoad() {\n this.hasActionTop = !!this.el.querySelector('[slot=\"action-top\"]');\n }\n componentWillRender() {\n var _a, _b, _c;\n let items;\n if (typeof this.items === 'string') {\n items = JSON.parse(this.items);\n }\n else {\n items = this.items;\n }\n this._items = items.map((item) => new Item(item.value, item.label, item.style, item.prefix));\n if (this.selectedItem === null && this.selectedIndex !== null) {\n this.selectedItem = (_a = this._items[this.selectedIndex]) !== null && _a !== void 0 ? _a : null;\n }\n if (this.value !== null) {\n if (this.type === 'selectOne') {\n const selected = (_b = this._items.find((item) => item.value() == this.value)) !== null && _b !== void 0 ? _b : null; // '==' required to support numeric values\n if (((_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.value()) !== (selected === null || selected === void 0 ? void 0 : selected.value())) {\n this.selectedItem = selected;\n }\n }\n else if (this.type === 'selectMany') {\n this.value = typeof this.value === 'string' ? JSON.parse(this.value) : this.value;\n this.selectedItems = this._items.filter((item) => this.value.includes(item.value()));\n }\n }\n }\n componentDidLoad() {\n window.addEventListener('mousedown', (e) => {\n if (e.composedPath().includes(this.el)) {\n return;\n }\n this.closeDropdown();\n });\n if (this.size === 'large') {\n this.$container.style.setProperty('--rs-dropdown-selected-container-height', '42px');\n }\n if (this.size === 'small') {\n this.$container.style.setProperty('--rs-dropdown-selected-container-height', '32px');\n }\n }\n renderSelected() {\n var _a;\n let label = this.placeholder;\n if (this.type === 'selectOne') {\n label = (_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.label();\n }\n else if (this.type === 'selectMany') {\n const labels = this.selectedItems.map((item) => item.label());\n if (labels.length === 1) {\n label = labels[0];\n }\n else if (labels.length > 1) {\n label = `${labels.slice(0, -1).join(', ')} & ${labels.slice(-1)}`;\n }\n }\n const content = label !== null && label !== void 0 ? label : this.placeholder;\n if (this.size === 'large') {\n return h(\"rs-content\", { class: \"dropdown__selected\", body: 2 }, content);\n }\n if (this.size === 'small') {\n return h(\"rs-caption\", { class: \"dropdown__selected\" }, content);\n }\n throw new Error(`Invalid size ${this.size}`);\n }\n renderItems() {\n if (this._items.length === 0) {\n return null;\n }\n const filtered = this._items\n .filter((item) => item.label().toLowerCase().includes(this.filterText.toLowerCase()));\n if (filtered.length === 0) {\n return h(\"div\", { class: \"dropdown__item dropdown__item--no-results\" }, \"No results found\");\n }\n return filtered.map((item) => {\n var _a;\n let isSelected = false;\n if (this.type === 'selectOne') {\n isSelected = item.value() == ((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.value());\n }\n else if (this.type === 'selectMany') {\n isSelected = this.selectedItems.some((selected) => selected.value() == item.value());\n }\n return item.render(this.selectItem, isSelected, this.type === 'selectMany');\n });\n }\n renderSearch() {\n return h(\"div\", { class: \"dropdown__search\" }, h(\"rs-icon\", { class: \"dropdown__search-icon\", name: \"search\" }), h(\"input\", { type: \"text\", onInput: this.filterItems }));\n }\n renderAction(position) {\n return h(\"div\", { class: `dropdown__action dropdown__action--${position}` }, h(\"slot\", { name: `action-${position}` }));\n }\n closeDropdown() {\n this.$container.classList.remove('is-open');\n }\n get el() { return getElement(this); }\n};\nRsDropdown.style = RsDropdownStyle0;\n\nconst inputCss = \".sc-rs-input-h{display:block;position:static;width:100%;padding:0}.rs-input__inner.sc-rs-input{display:flex;align-items:center;justify-content:flex-start;width:100%;height:42px;box-shadow:none;background:var(--rs-color-light);border:none;box-sizing:border-box;border-radius:4px;padding:11px 14px;transition:box-shadow .15s ease-out, background-color .15s ease-out}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input{height:32px;padding:8px}.size-small.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{padding:0 0 2px 0}.text-align-center.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:center}.text-align-right.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:right}.text-align-left.sc-rs-input-h .rs-input__inner.sc-rs-input .native-input.sc-rs-input{text-align:left}.native-input.sc-rs-input,.native-input.sc-rs-input:focus{border:none;background-image:none;background-color:transparent;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-appearance:none;outline:none;height:100%;width:100%;display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:14px;line-height:140%;color:var(--rs-color-heading);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;resize:none;padding:0}.native-input.sc-rs-input::placeholder{color:var(--rs-color-grey);font-family:Soleil, sans-serif;font-style:normal;font-weight:normal}.native-input[disabled].sc-rs-input{opacity:0.4}.has-value.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-primary);background-color:var(--rs-color-white);color:var(--rs-color-heading);outline:none;pointer-events:auto;opacity:1}.has-error.has-focus.sc-rs-input-h .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 2px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-error.sc-rs-input-h:not(.has-focus) .rs-input__inner.sc-rs-input{box-shadow:inset 0 0 0 1px var(--rs-color-negative);background-color:var(--rs-color-white)}.has-focus.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-grey)}.has-value.sc-rs-input-h:not(.has-focus) .max-length.sc-rs-input{display:block;opacity:1;color:var(--rs-color-grey-light)}.sc-rs-input-h .max-length.sc-rs-input{font-family:Soleil, sans-serif;font-style:normal;font-weight:normal;font-size:12px;line-height:13px;text-align:right;color:var(--rs-color-grey);display:none;opacity:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:5px;transition:opacity .15s ease-out, color .15s ease-out}.chars-over-max.sc-rs-input-h .max-length.sc-rs-input{color:var(--rs-color-negative)}.sc-rs-input-s>[slot=\\\"start\\\"]{margin-right:10px}.sc-rs-input-s>[slot=\\\"end\\\"]{margin-left:10px}\";\nconst RsInputStyle0 = inputCss;\n\nconst Input = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsInput = createEvent(this, \"rsInput\", 7);\n this.rsKeyDown = createEvent(this, \"rsKeyDown\", 7);\n this.rsInputChanged = createEvent(this, \"rsInputChanged\", 7);\n this.rsInputNoFocus = createEvent(this, \"rsInputNoFocus\", 7);\n this.rsInputFocus = createEvent(this, \"rsInputFocus\", 7);\n this.rsItem = createEvent(this, \"rsItem\", 7);\n this.didBlurAfterEdit = false;\n this.hasStartSlot = false;\n this.hasEndSlot = false;\n /**\n * Checks if the input has focus or not.\n * Any changes on this property will cause the render function to be called again\n */\n this.hasFocus = false; // initially, input field will have no focus\n /**\n * Character counter.\n * Used for updating the text above the input field.\n */\n this.charsLeft = 0;\n /**\n * Possible values are: date, email, number, password, search, tel, text, url, time.\n * The type of control to display.\n */\n this.type = 'text';\n /**\n * The value of the input field.\n */\n this.value = '';\n /**\n * (optional)\n * Puts the input field in a disabled state.\n */\n this.disabled = false;\n /**\n * (optional)\n * Puts the input in a readonly state.\n */\n this.readonly = false;\n /**\n * If true, value will be cleared after focus upon edit.\n */\n this.clearOnEdit = false;\n /**\n * If true, an icon will appear in the input when there's a value. Clicking the icon clears the input.\n */\n this.clearInput = false;\n /**\n * If true, the user must enter a value before submitting the form.\n */\n this.required = false;\n /**\n * Hides the max number of characters and the character counter text above the input field.\n */\n this.hideMax = false;\n /**\n * (hard max)\n * This specifies the maximum number of characters the user can enter.\n * If the user goes over the maximum number of characters, they won't be able to type anything in the input field anymore.\n */\n this.hardLimit = null;\n /**\n * (soft max)\n * This specifies the maximum number of characters the user can enter.\n * If the user goes over the maximum number of characters, they will still be able to type something in the input field.\n * Character counter above the input field will display.\n */\n this.softLimit = null;\n /**\n * Sets the input field to an error state - border will change to red.\n */\n this.hasError = false;\n /**\n * Sets the alignment of the text inside the input field\n */\n this.textAlign = 'left';\n /**\n * Sets the size of the input field\n * @protected\n */\n this.size = 'default';\n /**\n * The function which gets called when user enters something in the input field\n * @param ev - event\n */\n this.onInput = (ev) => {\n const input = ev.target;\n if (input !== null) {\n this.value = input.value || '';\n }\n this.rsInput.emit(ev);\n };\n /**\n * The function which gets called when input is in focus\n */\n this.onFocus = () => {\n this.hasFocus = true; // this element has focus now\n this.focusChanged();\n this.emitRsItem(); // emit change in style - should have the primary color when on focus\n this.rsInputFocus.emit(); // emit input focus event\n };\n /**\n * The function which gets called when focus on the input changes\n */\n this.focusChanged = () => {\n if (!this.hasFocus && this.hasValue()) {\n this.didBlurAfterEdit = true;\n }\n };\n /**\n * The function which gets called id we want to clear value on edit\n */\n this.shouldClearOnEdit = () => {\n const { type, clearOnEdit } = this;\n return (clearOnEdit === undefined) ? type === 'password' : clearOnEdit;\n };\n /**\n * The function which gets called when the user presses a key\n */\n this.onKeyDown = (ev) => {\n if (this.shouldClearOnEdit()) {\n // Did the input value change after it was blurred and edited\n if (this.didBlurAfterEdit && this.hasValue()) {\n // Clear the input\n this.clearTextInput();\n }\n }\n this.didBlurAfterEdit = false;\n this.rsKeyDown.emit(ev);\n };\n /**\n * The function which gets called when we want to clear the value\n */\n this.clearTextInput = (ev) => {\n if (this.clearInput !== undefined &&\n !this.readonly &&\n !this.disabled &&\n ev !== undefined) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n this.value = '';\n /**\n * This is needed for clearOnEdit\n * Otherwise the value will not be cleared\n * if user is inside the input\n */\n if (this.nativeElement !== null) {\n this.nativeElement.value = '';\n }\n };\n /**\n * The function which gets called when input gets out of focus\n */\n this.onBlur = () => {\n this.hasFocus = false;\n this.focusChanged();\n this.emitRsItem();\n this.rsInputNoFocus.emit();\n };\n }\n /**\n * Watch for any changes on the `disabled` property.\n */\n disabledChanged() {\n this.emitRsItem(); // disabled changed, emit change in styling\n }\n /**\n * Watch for any changes on the `value` property.\n */\n valueChanged() {\n this.emitRsItem(); // value changed, emit change in styling\n this.changeMaxLengthText();\n this.rsInputChanged.emit({ value: this.value == null ? this.value : this.value.toString() }); // emit change in input\n }\n hasErrorChanged() {\n this.emitRsItem();\n }\n /**\n * A method for re-rendering the input component\n */\n async update() {\n forceUpdate(this.el);\n }\n /**\n * A method for setting focus on the specified input field.\n */\n async setFocus() {\n if (this.nativeElement !== null) {\n this.nativeElement.focus(); // set focus\n }\n }\n /**\n * A method for getting the native `<input>` element used\n */\n getInputElement() {\n return Promise.resolve(this.nativeElement);\n }\n /**\n * Get the input's value\n */\n getValue() {\n return this.value || '';\n }\n /**\n * Check if the input has value\n */\n hasValue() {\n return this.getValue().length > 0;\n }\n /**\n * Emits `rsItem` event when the styles of the input change\n */\n emitRsItem() {\n this.rsItem.emit({\n 'input': true,\n 'interactive': true,\n 'has-focus': this.hasFocus,\n 'has-value': this.hasValue(),\n 'has-placeholder': this.placeholder !== null,\n 'has-error': this.hasError,\n 'has-max': this.hardLimit !== null || this.softLimit !== null,\n 'hide-max': this.hideMax,\n 'interactive-disabled': this.disabled,\n 'input-has-start-slot': this.hasStartSlot,\n 'input-has-end-slot': this.hasEndSlot,\n 'input-chars-over-max': this.charsLeft < 0,\n 'input-is-required': this.required\n });\n }\n /**\n * As the user types something in the input field, if soft max is set, then we show a character counter above the input field.\n * This function is for updating the text above the input field.\n */\n changeMaxLengthText() {\n if ((this.softLimit !== null && this.softLimit > 0) && !this.hideMax) {\n const valueLength = this.value.length; // the number of characters the user entered\n this.charsLeft = this.softLimit - valueLength;\n const maxLengthText = this.el.querySelector('.max-length');\n if (maxLengthText !== null) {\n // if no. of characters entered by the user is over the set max characters\n if (this.charsLeft < 0) {\n maxLengthText.innerHTML = `${Math.abs(this.charsLeft)} over`;\n this.el.classList.add('input-chars-over-max');\n // if no. of characters entered by the user is NOT over the set max character\n }\n else {\n maxLengthText.innerHTML = `${this.charsLeft} left`;\n this.el.classList.remove('input-chars-over-max');\n }\n }\n }\n }\n dataAttributes() {\n return Object.keys(this.el.dataset).reduce((acc, key) => {\n acc[`data-${key}`] = this.el.dataset[key];\n return acc;\n }, {});\n }\n /**\n * This gets called once just after the component gets fully loaded\n * and after the first render occurred.\n */\n componentDidLoad() {\n if ((this.softLimit !== undefined || this.hardLimit !== undefined)) {\n const maxLength = this.el.querySelector('.max-length');\n showCharacterCounter(maxLength, this.hardLimit, this.softLimit, this.hideMax);\n this.changeMaxLengthText(); // the char count should reflect the initial value's char count\n }\n }\n connectedCallback() {\n this.hasStartSlot = this.el.querySelector('[slot=\"start\"]') !== null;\n this.hasEndSlot = this.el.querySelector('[slot=\"end\"]') !== null;\n this.emitRsItem();\n }\n /**\n * This renders the component\n */\n render() {\n const value = this.getValue();\n let maxLengthText = null;\n if ((this.hardLimit || this.softLimit) && !this.hideMax) {\n const maxLength = this.hardLimit || this.softLimit;\n maxLengthText = (h(\"span\", { key: '43796315f9cf5aee0f1416f9638c6023d18f371c', class: \"max-length\" }, maxLength, \" max\"));\n }\n return (h(Host, { key: 'ac76f2196206d4fc99a05f5c6a64ec5590f1e065', class: {\n 'has-value': this.hasValue(),\n 'has-focus': this.hasFocus,\n 'has-placeholder': this.placeholder !== null,\n 'has-max': this.hardLimit !== null || this.softLimit !== null,\n 'hide-max': this.hideMax,\n 'chars-over-max': this.charsLeft < 0,\n 'has-error': this.hasError,\n [`text-align-${this.textAlign}`]: true,\n [`size-${this.size}`]: true\n } }, maxLengthText, h(\"div\", { key: '549979b3c5ab691fcfa702fb43863db80835e6c1', class: \"rs-input__inner\" }, h(\"slot\", { key: 'f6fb85cf6533e447c22a7a2f615a721dcbeee5bb', name: \"start\" }), h(\"input\", Object.assign({ key: 'bcba32b735ac871b9ffbcd9c07c74f4d27bd50f5' }, this.dataAttributes(), { class: \"native-input\", ref: input => this.nativeElement = input, disabled: this.disabled, readonly: this.readonly, onInput: this.onInput, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, placeholder: this.placeholder, type: this.type, required: this.required, name: this.name, maxlength: this.hardLimit, min: this.min, max: this.max, value: value })), h(\"slot\", { key: '248265fc89456303f1a3ab57ed1d053e5248f35e', name: \"end\" }))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"disabled\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"],\n \"hasError\": [\"hasErrorChanged\"]\n }; }\n};\nInput.style = RsInputStyle0;\n\nconst labelCss = \"rs-label{display:block;font-family:Soleil, sans-serif;font-style:normal;font-weight:600;font-size:12px;color:var(--rs-color-grey);line-height:13px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;pointer-events:none;margin-bottom:5px}.item-has-focus rs-label{color:var(--rs-color-primary-700) !important}rs-label.label-floating{transform:translate3d(0, 32px, 0);transform-origin:left top;transition:transform 0.25s ease-in-out, font-size 0.25s ease-in-out;font-size:14px;font-weight:normal;padding-left:14px}.item-has-focus rs-label.label-floating,.item-has-value rs-label.label-floating{transform:translate3d(0, 0, 0);font-size:12px;font-weight:600}.item-has-max rs-label.label-fixed,.item-has-max rs-label.label-floating{position:absolute;top:0}.item-has-error rs-label{color:var(--rs-color-negative) !important}.item-input-has-start-slot rs-label.label-floating,.item-textarea-has-start-slot rs-label.label-floating{padding-left:38px}.item-input-has-start-slot.item-has-focus rs-label.label-floating,.item-input-has-start-slot.item-has-value rs-label.label-floating,.item-textarea-has-start-slot.item-has-focus rs-label.label-floating,.item-textarea-has-start-slot.item-has-value rs-label.label-floating{transform:translate3d(-22px, 0, 0);font-size:12px}\";\nconst RsLabelStyle0 = labelCss;\n\nconst Label = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.rsItem = createEvent(this, \"rsItem\", 7);\n /**\n * (optional)\n * Possible values are: primary or grey.\n */\n this.color = 'grey';\n /**\n * Possible values are: floating or fixed.\n * This determines where and how the label behaves inside an item\n */\n this.position = 'floating';\n }\n emitRsItem() {\n this.rsItem.emit({\n [`label-${this.position}`]: this.position !== null,\n 'has-label': true\n });\n }\n /**\n * This renders the component\n */\n render() {\n const position = this.position;\n this.emitRsItem();\n return (h(Host, { key: 'db0eb178ea17a5c03e6fcdb44d4ff1a2d260a98d', class: {\n [`label-${position}`]: position !== null,\n }, style: {\n color: this.color !== undefined ? `var(--rs-color-${this.color})` : ''\n } }, h(\"slot\", { key: 'a82d3d4145672252fca96c96ef4292922a0f3646' })));\n }\n get el() { return getElement(this); }\n};\nLabel.style = RsLabelStyle0;\n\nconst toggleCss = \".toggle{display:block;padding:4px;background:var(--rs-color-select-background);box-shadow:inset 0 0 0 1px var(--rs-color-select-secondary);border-radius:4px;height:42px;box-sizing:border-box}.toggle__items{display:flex;flex-direction:row;position:relative;gap:4px}.active-tab{position:absolute;height:calc(100%);background:var(--rs-color-white);z-index:1;transition:left 0.15s ease-out;border-radius:2px;box-shadow:inset 0 0 0 1px var(--rs-color-select-border), 0 1px 5px 0 rgb(195 213 226 / 0.62)}\";\nconst RsToggleStyle0 = toggleCss;\n\nconst Toggle = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.toggle = createEvent(this, \"toggle\", 7);\n this.currentPosition = 0;\n this.hasMovedActiveTab = false;\n this.renderToggleBar = () => {\n this.toggleItems = this.host.querySelectorAll('rs-toggle-item');\n this.activeTabElement.style.width = `calc(${(100 / this.toggleItems.length)}%)`;\n this.toggleItems.forEach((item, position) => {\n if (item.getAttribute('active') !== null) {\n this.moveActiveTab(position);\n }\n item.addEventListener('click', () => {\n if (this.currentPosition === position) {\n return;\n }\n this.moveActiveTab(position);\n this.removeAllActiveProp();\n item.setAttribute('active', 'true');\n this.emitToggleEvent();\n });\n item.addEventListener('activeSet', (e) => {\n if (e.detail) {\n this.moveActiveTab(position);\n }\n });\n });\n if (!this.hasMovedActiveTab) {\n this.moveActiveTab(0);\n }\n };\n }\n /**\n * Set the current active state of the toggle\n */\n async setActivePosition(position = 0) {\n this.removeAllActiveProp();\n this.moveActiveTab(position);\n this.emitToggleEvent();\n }\n removeAllActiveProp() {\n this.toggleItems.forEach(item => {\n item.removeAttribute('active');\n });\n }\n moveActiveTab(position) {\n this.activeTabElement.style.left = `calc(${(100 / this.toggleItems.length * position)}%)`;\n this.currentPosition = position;\n this.hasMovedActiveTab = true;\n }\n emitToggleEvent() {\n this.toggle.emit({ value: this.currentPosition, target: this.toggleItems[this.currentPosition] });\n }\n componentDidRender() {\n this.renderToggleBar();\n }\n render() {\n return (h(Host, { key: 'cdbdd9f9c8418f51bd7409429a57f036e06ece61' }, h(\"div\", { key: 'd614a83d569477128581b2e366c30de92faddac0', class: 'toggle' }, h(\"div\", { key: '2f2b50e33c7da270bb2826325c4c5c6ed8fa00da', class: 'toggle__items' }, h(\"slot\", { key: '8a675ed2c0e6558da3fdd3c149ff3df61c1df75d', onSlotchange: this.renderToggleBar }), h(\"div\", { key: 'e0b0d5d8a17106514f20c77aaa861b7f6b63fd9e', ref: el => this.activeTabElement = el, class: 'active-tab' })))));\n }\n get host() { return getElement(this); }\n};\nToggle.style = RsToggleStyle0;\n\nconst toggleItemCss = \":host{box-sizing:border-box;display:flex;padding:7px;text-align:center;z-index:2;cursor:pointer;user-select:none;flex:1 1 0;line-height:initial;justify-content:center;align-items:center;height:34px}:host(.active){cursor:default}\";\nconst RsToggleItemStyle0 = toggleItemCss;\n\nconst ToggleItem = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.activeSet = createEvent(this, \"activeSet\", 7);\n /**\n * If true, this item will be marked as active in the toggle\n */\n this.active = false;\n }\n setActive() {\n this.activeSet.emit(this.active);\n }\n render() {\n return (h(Host, { key: 'ea934495cbd83ebf06b2c0becc8db1a1f9ddd2f4', class: {\n 'active': this.active\n } }, h(\"rs-content\", { key: '127f1a8018cbdba9a91a90e2a5428dbe716aee70', body: 2 }, h(\"slot\", { key: '2c234c0a501c7d33cdf18aedf3d5cdc4cbc536e2' }))));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"active\": [\"setActive\"]\n }; }\n};\nToggleItem.style = RsToggleItemStyle0;\n\nexport { RsDropdown as rs_dropdown, Input as rs_input, Label as rs_label, Toggle as rs_toggle, ToggleItem as rs_toggle_item };\n\n//# sourceMappingURL=rs-dropdown_5.entry.js.map"],"names":["debounce","func","wait","timer","args","clearTimeout","setTimeout","itemStyle","ev","itemStyles","element","tagName","undefined","target","toLowerCase","replace","updatedStyles","detail","newStyles","childStyles","get","hasStyleChange","Object","keys","forEach","key","itemKey","length","set","f","showCharacterCounter","maxLengthElement","hardLimit","softLimit","hideMax","style","display","opacity","Item","constructor","_value","_label","_style","_prefix","this","onClick","callback","_el","value","label","prefixDisplay","h","class","render","selectedItem","isSelectMany","ref","el","checked","pointerEvents","assign","overflow","textOverflow","RsDropdown","hostRef","r","rsChange","c","showDropdown","hideDropdown","items","type","size","maxHeight","searchable","placeholder","selectedIndex","maxWidth","selectedItems","filterText","toggleDropdown","_a","_b","_items","hasActionTop","$container","classList","toggle","contains","emit","$itemContainer","scrollTop","offsetTop","offsetHeight","filterItems","e","selectItem","item","closeDropdown","some","selected","filter","map","clear","H","tabindex","renderSelected","renderSearch","renderAction","renderItems","componentWillLoad","querySelector","componentWillRender","_c","JSON","parse","prefix","find","includes","componentDidLoad","window","addEventListener","composedPath","setProperty","labels","slice","join","content","body","Error","filtered","isSelected","name","onInput","position","remove","g","Input","rsInput","rsKeyDown","rsInputChanged","rsInputNoFocus","rsInputFocus","rsItem","didBlurAfterEdit","hasStartSlot","hasEndSlot","hasFocus","charsLeft","disabled","readonly","clearOnEdit","clearInput","required","hasError","textAlign","input","onFocus","focusChanged","emitRsItem","hasValue","shouldClearOnEdit","onKeyDown","clearTextInput","preventDefault","stopPropagation","nativeElement","onBlur","disabledChanged","valueChanged","changeMaxLengthText","toString","hasErrorChanged","update","setFocus","focus","getInputElement","Promise","resolve","getValue","valueLength","maxLengthText","innerHTML","Math","abs","add","dataAttributes","dataset","reduce","acc","maxLength","s","connectedCallback","maxlength","min","max","watchers","Label","color","Toggle","currentPosition","hasMovedActiveTab","renderToggleBar","toggleItems","host","querySelectorAll","activeTabElement","width","getAttribute","moveActiveTab","removeAllActiveProp","setAttribute","emitToggleEvent","setActivePosition","removeAttribute","left","componentDidRender","onSlotchange","ToggleItem","activeSet","active","setActive"],"sourceRoot":""}
|
package/build/8.index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @rocketspark/domain-checker v1.0.
|
|
3
|
+
* @rocketspark/domain-checker v1.0.3
|
|
4
4
|
* https://github.com/rocketspark/domain-checker.git
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) Lee Reichardt and project contributors.
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[8],{4008:function(t,s
|
|
12
|
+
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[8],{4008:function(t,e,s){s.r(e),s.d(e,{rs_row:function(){return n}});var r=s(6919);const n=class{constructor(t){(0,r.r)(this,t),this.wrap="wrap",this.justifyContent="flex-start"}render(){return(0,r.h)(r.H,{key:"02b26f3228e332f031d1fa2238aea8a589b2bdb4",style:{"flex-wrap":this.wrap,"justify-content":this.justifyContent}},(0,r.h)("slot",{key:"3c611a9264b16ca0dd787128702e1c26fd240be4"}))}};n.style=":host{display:flex}"}}]);
|
|
13
13
|
//# sourceMappingURL=8.index.js.map
|
package/build/8.index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"8.index.js","mappings":";;;;;;;;;;;2KAEA,
|
|
1
|
+
{"version":3,"file":"8.index.js","mappings":";;;;;;;;;;;2KAEA,MAGMA,EAAQ,MACV,WAAAC,CAAYC,IACR,IAAAC,GAAiBC,KAAMF,GAIvBE,KAAKC,KAAO,OAIZD,KAAKE,eAAiB,YAC1B,CACA,MAAAC,GACI,OAAQ,IAAAC,GAAE,EAAAC,EAAM,CAAEC,IAAK,2CAA4CC,MAAO,CAClE,YAAaP,KAAKC,KAClB,kBAAmBD,KAAKE,kBACvB,IAAAE,GAAE,OAAQ,CAAEE,IAAK,6CAC9B,GAEJV,EAAMW,MAtBS,qB","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-row.entry.js"],"sourcesContent":["import { r as registerInstance, h, H as Host } from './index-def1ecaa.js';\n\nconst rowCss = \":host{display:flex}\";\nconst RsRowStyle0 = rowCss;\n\nconst RsRow = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * flex-wrap CSS value\n */\n this.wrap = 'wrap';\n /**\n * justify-content CSS value\n */\n this.justifyContent = 'flex-start';\n }\n render() {\n return (h(Host, { key: '02b26f3228e332f031d1fa2238aea8a589b2bdb4', style: {\n 'flex-wrap': this.wrap,\n 'justify-content': this.justifyContent\n } }, h(\"slot\", { key: '3c611a9264b16ca0dd787128702e1c26fd240be4' })));\n }\n};\nRsRow.style = RsRowStyle0;\n\nexport { RsRow as rs_row };\n\n//# sourceMappingURL=rs-row.entry.js.map"],"names":["RsRow","constructor","hostRef","r","this","wrap","justifyContent","render","h","H","key","style"],"sourceRoot":""}
|
package/build/808.index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @rocketspark/domain-checker v1.0.
|
|
3
|
+
* @rocketspark/domain-checker v1.0.3
|
|
4
4
|
* https://github.com/rocketspark/domain-checker.git
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) Lee Reichardt and project contributors.
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[808],{3808:function(t,e,i){i.r(e),i.d(e,{rs_multi_select_item:function(){return l}});var s=i(
|
|
12
|
+
"use strict";(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[808],{3808:function(t,e,i){i.r(e),i.d(e,{rs_multi_select_item:function(){return l}});var s=i(6919);const l=class{constructor(t){(0,s.r)(this,t),this.selected=!1,this.featured=!1,this.value="",this.width="100%",this.error=!1,this.showStar=!1,this.getCircleTickIcon=()=>(0,s.h)("span",{class:{"multi-select-item__icon--tick-container":!0,"multi-select-item__icon--tick-container-show":this.selected}},(0,s.h)("rs-icon",{class:"multi-select-item__icon--tick",name:"circle-tick",color:"primary-300",size:18})),this.getStarIcon=()=>(0,s.h)("div",{class:{"multi-select-item__icon--star":!0,"multi-select-item__icon--star-show":this.showStar||this.featured,"multi-select-item__icon--star-featured":this.featured},innerHTML:'<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M0.540428 7.15015L0.5 7.24448V7.34711C0.5 7.35157 0.499996 7.3562 0.499992 7.36098C0.499906 7.46953 0.499756 7.65797 0.541209 7.84154C0.584229 8.03205 0.6894 8.2951 0.958339 8.46062L4.9385 11.2773L3.38064 16.012C3.2564 16.268 3.27391 16.5435 3.35288 16.7589C3.42334 16.9511 3.55937 17.1423 3.75881 17.2656C3.848 17.3552 3.95447 17.4227 4.08022 17.4614C4.20916 17.501 4.33666 17.5003 4.39316 17.5C4.39753 17.5 4.40147 17.5 4.40496 17.5C4.4084 17.5 4.41223 17.5 4.41641 17.5C4.51791 17.5006 4.83213 17.5023 5.07744 17.2375L8.94161 14.4382L13.0478 17.2574C13.1526 17.3534 13.2704 17.4249 13.4081 17.4642C13.5357 17.5007 13.6568 17.5002 13.7158 17.5C13.7199 17.5 13.7238 17.5 13.7273 17.5C13.7297 17.5 13.7324 17.5 13.7354 17.5C13.7845 17.5002 13.8997 17.5006 14.0272 17.4614C14.1457 17.4249 14.2516 17.3632 14.3479 17.2803C14.6058 17.1286 14.7068 16.8737 14.7472 16.7004C14.7896 16.5191 14.7894 16.3288 14.7893 16.2213C14.7893 16.2162 14.7893 16.2113 14.7893 16.2066V16.1205L14.7605 16.0394L13.0689 11.2721L17.0417 8.46062C17.3106 8.29509 17.4158 8.03204 17.4588 7.84153C17.5002 7.65798 17.5001 7.46955 17.5 7.36101C17.5 7.35622 17.5 7.35158 17.5 7.34711V7.24448L17.4596 7.15015C17.2562 6.67562 16.7959 6.51654 16.438 6.51654H11.5861L9.99137 1.24176C9.98071 1.13789 9.95029 1.03139 9.89167 0.930361C9.81604 0.800036 9.70971 0.706786 9.59727 0.643232C9.389 0.525513 9.14368 0.5 8.93388 0.5C8.75728 0.5 8.53929 0.536262 8.34988 0.665868C8.15949 0.796141 8.03329 0.998601 8.00858 1.24195L6.41394 6.51654H1.56198C1.20412 6.51654 0.743795 6.67562 0.540428 7.15015Z" stroke="#2C3035"/>\n</svg>\n',onClick:this.starItem,ref:t=>this.starIconElement=t}),this.getErrorIcon=()=>this.error?(0,s.h)("span",{class:"multi-select-item__icon--error"}):"",this.starItem=t=>{t.stopImmediatePropagation(),this.featured=!this.featured,this.featured?(this.selected=!0,this.pushItemToMultiSelectedItems(this.value),this.pushItemToMultiFeaturedItems(this.value)):(this.selected=!1,this.removeItemFromMultiSelectedItems(this.value),this.removeItemFromMultiFeaturedItems(this.value))},this.selectItem=()=>{this.selected=!this.selected,this.selected?this.pushItemToMultiSelectedItems(this.value):this.removeItemFromMultiSelectedItems(this.value)},this.onMouseOver=()=>{this.showStar=!0},this.onMouseLeave=()=>{this.showStar=!1},this.onMouseDown=()=>{this.selected&&this.featured&&(this.starIconElement.style.transform="scale(1.3)")},this.onMouseUp=()=>{this.selected&&this.featured&&(this.starIconElement.style.transform=null)}}componentWillLoad(){var t,e;null!==(this.multiSelect=this.el.closest("rs-multi-select"))&&(this.featured=null===(t=this.multiSelect.featuredItems)||void 0===t?void 0:t.includes(this.value),this.selected=(null===(e=this.multiSelect.selectedItems)||void 0===e?void 0:e.includes(this.value))||this.featured)}static noDuplicates(t){return"string"==typeof t&&(t=l.toArray(t)),null==t?void 0:t.filter(((t,e,i)=>i.indexOf(t)==e))}pushItemToMultiSelectedItems(t){let e=""===this.multiSelect.selectedItems?[]:l.toArray(this.multiSelect.selectedItems);null==e||e.push(t),e=l.noDuplicates(e),this.multiSelect.setAttribute("selected-items",e.toString())}removeItemFromMultiSelectedItems(t){let e=""===this.multiSelect.selectedItems?[]:l.toArray(this.multiSelect.selectedItems);e=null==e?void 0:e.filter((e=>e!==t)),e=l.noDuplicates(e),this.multiSelect.setAttribute("selected-items",e.toString())}pushItemToMultiFeaturedItems(t){let e=""===this.multiSelect.featuredItems?[]:l.toArray(this.multiSelect.featuredItems);null==e||e.push(t),e=l.noDuplicates(e),this.multiSelect.setAttribute("featured-items",e.toString())}removeItemFromMultiFeaturedItems(t){let e=""===this.multiSelect.featuredItems?[]:l.toArray(this.multiSelect.featuredItems);e=null==e?void 0:e.filter((e=>e!==t)),e=l.noDuplicates(e),this.multiSelect.setAttribute("featured-items",e.toString())}static toArray(t){return"string"==typeof t?null==t?void 0:t.split(",").map((t=>t.trim())):t}render(){return(0,s.h)(s.H,{key:"c4d9c2e5a97a0de75d51bd659ea2e3a6e9060c69",class:{"multi-select-item--selected":this.selected,"multi-select-item--featured":this.featured},onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},this.getStarIcon(),(0,s.h)("div",{key:"8828f1af6724ff4b140951b24b0135f0a10164b2",class:"multi-select-item__content-container",style:{width:this.width},onClick:this.selectItem},this.getErrorIcon(),this.getCircleTickIcon(),(0,s.h)("slot",{key:"9065424855a61d0c0285b9c1f51107c4fb4a5d95"})))}static get assetsDirs(){return["assets"]}get el(){return(0,s.g)(this)}};l.style=":host{display:block;position:relative}.multi-select-item__content-container{display:block;padding:8px;box-sizing:border-box;border-radius:7px;box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);transition:box-shadow 0.2s cubic-bezier(0, 0.55, 0.45, 1);position:relative;cursor:pointer;z-index:1}:host(:hover) .multi-select-item__content-container{box-shadow:inset 0 0 0 2px var(--rs-color-grey-300)}:host(.multi-select-item--selected) .multi-select-item__content-container{box-shadow:inset 0 0 0 2px var(--rs-color-primary)}:host(.multi-select-item--selected.multi-select-item--featured){cursor:not-allowed}:host(.multi-select-item--selected.multi-select-item--featured) .multi-select-item__content-container{pointer-events:none}.multi-select-item__icon--tick-container{position:absolute;right:15px;top:15px;opacity:0;transition:opacity 0.15s cubic-bezier(0, 0.55, 0.45, 1);z-index:2;background-color:var(--rs-color-white);padding:1.2px 1.5px 1.5px;display:flex;align-items:center;justify-content:center;border-radius:50%;box-sizing:border-box}.multi-select-item__icon--tick-container-show{opacity:1}.multi-select-item__icon--star{position:absolute;left:15px;top:15px;opacity:0;z-index:3;cursor:pointer;line-height:0;transform:none;transition:opacity 0.15s cubic-bezier(0, 0.55, 0.45, 1), transform 0.2s cubic-bezier(0, 0.55, 0.45, 1)}.multi-select-item__icon--star-show{opacity:1}.multi-select-item__icon--star svg{fill:rgb(255 255 255 / 0.7)}.multi-select-item__icon--star.multi-select-item__icon--star-featured svg{fill:var(--rs-color-highlight)}.multi-select-item__icon--star svg path{transition:stroke 0.15s cubic-bezier(0, 0.55, 0.45, 1);stroke:var(--rs-color-grey-700)}:host(.multi-select-item--selected) .multi-select-item__icon--star svg path,:host(.multi-select-item--featured) .multi-select-item__icon--star svg path{stroke:var(--rs-color-secondary-variant)}.multi-select-item__icon--error{position:absolute;right:20px;top:20px;opacity:1;width:8px;height:8px;background-color:var(--rs-color-negative);border-radius:50%;z-index:2}"}}]);
|
|
13
13
|
//# sourceMappingURL=808.index.js.map
|
package/build/808.index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"808.index.js","mappings":";;;;;;;;;;;2LAEA,MAOMA,EAAoB,MACxB,WAAAC,CAAYC,IACV,IAAAC,GAAiBC,KAAMF,GACvBE,KAAKC,kBAAoB,KACf,IAAAC,GAAE,OAAQ,CAAEC,MAAO,CACvB,2CAA2C,EAC3C,+CAAgDH,KAAKI,YAClD,IAAAF,GAAE,UAAW,CAAEC,MAAO,gCAAiCE,KAAM,cAAeC,MAAO,cAAeC,KAAM,MAEjHP,KAAKQ,YAAc,KACT,IAAAN,GAAE,MAAO,CAAEC,MAAO,CACtB,iCAAiC,EACjC,qCAAsCH,KAAKS,UAAYT,KAAKU,SAC5D,yCAA0CV,KAAKU,UAC9CC,UArBE,+pDAqBeC,QAASZ,KAAKa,SAAUC,IAAKC,GAAMf,KAAKgB,gBAAkBD,IAElFf,KAAKiB,aAAe,IACXjB,KAAKkB,OAAS,IAAAhB,GAAE,OAAQ,CAAEC,MAAO,mCAAuC,GAEjFH,KAAKa,SAAYM,IACfA,EAAMC,2BACNpB,KAAKU,UAAYV,KAAKU,SAClBV,KAAKU,UACPV,KAAKI,UAAW,EAChBJ,KAAKqB,6BAA6BrB,KAAKsB,OACvCtB,KAAKuB,6BAA6BvB,KAAKsB,SAGvCtB,KAAKI,UAAW,EAChBJ,KAAKwB,iCAAiCxB,KAAKsB,OAC3CtB,KAAKyB,iCAAiCzB,KAAKsB,OAC7C,EAEFtB,KAAK0B,WAAa,KAChB1B,KAAKI,UAAYJ,KAAKI,SAClBJ,KAAKI,SACPJ,KAAKqB,6BAA6BrB,KAAKsB,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AAKiB,eAAgBjB,KAAKC,qBAAqB,IAAAC,GAAE,OAAQ,OAC5F,CACA,qBAAW4D,GAAe,MAAO,CAAC,SAAW,CAC7C,MAAI/C,GAAO,OAAO,IAAAgD,GAAW/D,KAAO,GAEtCJ,EAAkBkC,MAlIW,4/D","sources":["webpack://DomainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-multi-select-item.entry.js"],"sourcesContent":["import { r as registerInstance, h, H as Host, g as getElement } from './index-3d0f28ab.js';\n\nconst star = `<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M0.540428 7.15015L0.5 7.24448V7.34711C0.5 7.35157 0.499996 7.3562 0.499992 7.36098C0.499906 7.46953 0.499756 7.65797 0.541209 7.84154C0.584229 8.03205 0.6894 8.2951 0.958339 8.46062L4.9385 11.2773L3.38064 16.012C3.2564 16.268 3.27391 16.5435 3.35288 16.7589C3.42334 16.9511 3.55937 17.1423 3.75881 17.2656C3.848 17.3552 3.95447 17.4227 4.08022 17.4614C4.20916 17.501 4.33666 17.5003 4.39316 17.5C4.39753 17.5 4.40147 17.5 4.40496 17.5C4.4084 17.5 4.41223 17.5 4.41641 17.5C4.51791 17.5006 4.83213 17.5023 5.07744 17.2375L8.94161 14.4382L13.0478 17.2574C13.1526 17.3534 13.2704 17.4249 13.4081 17.4642C13.5357 17.5007 13.6568 17.5002 13.7158 17.5C13.7199 17.5 13.7238 17.5 13.7273 17.5C13.7297 17.5 13.7324 17.5 13.7354 17.5C13.7845 17.5002 13.8997 17.5006 14.0272 17.4614C14.1457 17.4249 14.2516 17.3632 14.3479 17.2803C14.6058 17.1286 14.7068 16.8737 14.7472 16.7004C14.7896 16.5191 14.7894 16.3288 14.7893 16.2213C14.7893 16.2162 14.7893 16.2113 14.7893 16.2066V16.1205L14.7605 16.0394L13.0689 11.2721L17.0417 8.46062C17.3106 8.29509 17.4158 8.03204 17.4588 7.84153C17.5002 7.65798 17.5001 7.46955 17.5 7.36101C17.5 7.35622 17.5 7.35158 17.5 7.34711V7.24448L17.4596 7.15015C17.2562 6.67562 16.7959 6.51654 16.438 6.51654H11.5861L9.99137 1.24176C9.98071 1.13789 9.95029 1.03139 9.89167 0.930361C9.81604 0.800036 9.70971 0.706786 9.59727 0.643232C9.389 0.525513 9.14368 0.5 8.93388 0.5C8.75728 0.5 8.53929 0.536262 8.34988 0.665868C8.15949 0.796141 8.03329 0.998601 8.00858 1.24195L6.41394 6.51654H1.56198C1.20412 6.51654 0.743795 6.67562 0.540428 7.15015Z\" stroke=\"#2C3035\"/>\n</svg>\n`;\n\nconst rsMultiSelectItemCss = \":host{display:block;position:relative}.multi-select-item__content-container{display:block;padding:8px;box-sizing:border-box;border-radius:7px;box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);transition:box-shadow 0.2s cubic-bezier(0, 0.55, 0.45, 1);position:relative;cursor:pointer;z-index:1}:host(:hover) .multi-select-item__content-container{box-shadow:inset 0 0 0 2px var(--rs-color-grey-300)}:host(.multi-select-item--selected) .multi-select-item__content-container{box-shadow:inset 0 0 0 2px var(--rs-color-primary)}:host(.multi-select-item--selected.multi-select-item--featured){cursor:not-allowed}:host(.multi-select-item--selected.multi-select-item--featured) .multi-select-item__content-container{pointer-events:none}.multi-select-item__icon--tick-container{position:absolute;right:15px;top:15px;opacity:0;transition:opacity 0.15s cubic-bezier(0, 0.55, 0.45, 1);z-index:2;background-color:var(--rs-color-white);padding:1.2px 1.5px 1.5px;display:flex;align-items:center;justify-content:center;border-radius:50%;box-sizing:border-box}.multi-select-item__icon--tick-container-show{opacity:1}.multi-select-item__icon--star{position:absolute;left:15px;top:15px;opacity:0;z-index:3;cursor:pointer;line-height:0;transform:none;transition:opacity 0.15s cubic-bezier(0, 0.55, 0.45, 1), transform 0.2s cubic-bezier(0, 0.55, 0.45, 1)}.multi-select-item__icon--star-show{opacity:1}.multi-select-item__icon--star svg{fill:rgb(255 255 255 / 0.7)}.multi-select-item__icon--star.multi-select-item__icon--star-featured svg{fill:var(--rs-color-highlight)}.multi-select-item__icon--star svg path{transition:stroke 0.15s cubic-bezier(0, 0.55, 0.45, 1);stroke:var(--rs-color-grey-700)}:host(.multi-select-item--selected) .multi-select-item__icon--star svg path,:host(.multi-select-item--featured) .multi-select-item__icon--star svg path{stroke:var(--rs-color-secondary-variant)}.multi-select-item__icon--error{position:absolute;right:20px;top:20px;opacity:1;width:8px;height:8px;background-color:var(--rs-color-negative);border-radius:50%;z-index:2}\";\n\nconst RsMultiSelectItem = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.getCircleTickIcon = () => {\n return (h(\"span\", { class: {\n 'multi-select-item__icon--tick-container': true,\n 'multi-select-item__icon--tick-container-show': this.selected\n } }, h(\"rs-icon\", { class: \"multi-select-item__icon--tick\", name: \"circle-tick\", color: \"primary-300\", size: 18 })));\n };\n this.getStarIcon = () => {\n return (h(\"div\", { class: {\n 'multi-select-item__icon--star': true,\n 'multi-select-item__icon--star-show': this.showStar || this.featured,\n 'multi-select-item__icon--star-featured': this.featured,\n }, innerHTML: star, onClick: this.starItem, ref: el => this.starIconElement = el }));\n };\n this.getErrorIcon = () => {\n return this.error ? (h(\"span\", { class: \"multi-select-item__icon--error\" })) : '';\n };\n this.starItem = (event) => {\n event.stopImmediatePropagation();\n this.featured = !this.featured;\n if (this.featured) {\n this.selected = true;\n this.pushItemToMultiSelectedItems(this.value);\n this.pushItemToMultiFeaturedItems(this.value);\n }\n else {\n this.selected = false;\n this.removeItemFromMultiSelectedItems(this.value);\n this.removeItemFromMultiFeaturedItems(this.value);\n }\n };\n this.selectItem = () => {\n this.selected = !this.selected;\n if (this.selected) {\n this.pushItemToMultiSelectedItems(this.value);\n }\n else {\n this.removeItemFromMultiSelectedItems(this.value);\n }\n };\n this.onMouseOver = () => {\n this.showStar = true;\n };\n this.onMouseLeave = () => {\n this.showStar = false;\n };\n this.onMouseDown = () => {\n if (this.selected && this.featured) {\n this.starIconElement.style.transform = 'scale(1.3)';\n }\n };\n this.onMouseUp = () => {\n if (this.selected && this.featured) {\n this.starIconElement.style.transform = null;\n }\n };\n this.selected = false;\n this.featured = false;\n this.value = '';\n this.width = '100%';\n this.error = false;\n this.showStar = false;\n }\n componentWillLoad() {\n var _a, _b;\n const multiSelect = this.multiSelect = this.el.closest('rs-multi-select');\n if (multiSelect !== null) {\n this.featured = (_a = this.multiSelect.featuredItems) === null || _a === void 0 ? void 0 : _a.includes(this.value);\n this.selected = ((_b = this.multiSelect.selectedItems) === null || _b === void 0 ? void 0 : _b.includes(this.value)) || this.featured;\n }\n }\n static noDuplicates(items) {\n if (typeof items === 'string') {\n items = RsMultiSelectItem.toArray(items);\n }\n return items === null || items === void 0 ? void 0 : items.filter((item, index, inputArray) => {\n return inputArray.indexOf(item) == index;\n });\n }\n pushItemToMultiSelectedItems(value) {\n let selectedItemsArray = this.multiSelect.selectedItems === '' ? [] : RsMultiSelectItem.toArray(this.multiSelect.selectedItems);\n selectedItemsArray === null || selectedItemsArray === void 0 ? void 0 : selectedItemsArray.push(value);\n selectedItemsArray = RsMultiSelectItem.noDuplicates(selectedItemsArray);\n this.multiSelect.setAttribute('selected-items', selectedItemsArray.toString());\n }\n removeItemFromMultiSelectedItems(value) {\n let selectedItemsArray = this.multiSelect.selectedItems === '' ? [] : RsMultiSelectItem.toArray(this.multiSelect.selectedItems);\n selectedItemsArray = selectedItemsArray === null || selectedItemsArray === void 0 ? void 0 : selectedItemsArray.filter(selectedItem => {\n return selectedItem !== value;\n });\n selectedItemsArray = RsMultiSelectItem.noDuplicates(selectedItemsArray);\n this.multiSelect.setAttribute('selected-items', selectedItemsArray.toString());\n }\n pushItemToMultiFeaturedItems(value) {\n let featuredItemsArray = this.multiSelect.featuredItems === '' ? [] : RsMultiSelectItem.toArray(this.multiSelect.featuredItems);\n featuredItemsArray === null || featuredItemsArray === void 0 ? void 0 : featuredItemsArray.push(value);\n featuredItemsArray = RsMultiSelectItem.noDuplicates(featuredItemsArray);\n this.multiSelect.setAttribute('featured-items', featuredItemsArray.toString());\n }\n removeItemFromMultiFeaturedItems(value) {\n let featuredItemsArray = this.multiSelect.featuredItems === '' ? [] : RsMultiSelectItem.toArray(this.multiSelect.featuredItems);\n featuredItemsArray = featuredItemsArray === null || featuredItemsArray === void 0 ? void 0 : featuredItemsArray.filter(featuredItem => {\n return featuredItem !== value;\n });\n featuredItemsArray = RsMultiSelectItem.noDuplicates(featuredItemsArray);\n this.multiSelect.setAttribute('featured-items', featuredItemsArray.toString());\n }\n static toArray(items) {\n if (typeof items === 'string') {\n return items === null || items === void 0 ? void 0 : items.split(',').map(item => {\n return item.trim();\n });\n }\n return items;\n }\n render() {\n return (h(Host, { class: {\n 'multi-select-item--selected': this.selected,\n 'multi-select-item--featured': this.featured,\n }, onMouseOver: this.onMouseOver, onMouseLeave: this.onMouseLeave, onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp }, this.getStarIcon(), h(\"div\", { class: \"multi-select-item__content-container\", style: {\n 'width': this.width\n }, onClick: this.selectItem }, this.getErrorIcon(), this.getCircleTickIcon(), h(\"slot\", null))));\n }\n static get assetsDirs() { return [\"assets\"]; }\n get el() { return getElement(this); }\n};\nRsMultiSelectItem.style = rsMultiSelectItemCss;\n\nexport { RsMultiSelectItem as rs_multi_select_item };\n\n//# sourceMappingURL=rs-multi-select-item.entry.js.map"],"names":["RsMultiSelectItem","constructor","hostRef","r","this","getCircleTickIcon","h","class","selected","name","color","size","getStarIcon","showStar","featured","innerHTML","onClick","starItem","ref","el","starIconElement","getErrorIcon","error","event","stopImmediatePropagation","pushItemToMultiSelectedItems","value","pushItemToMultiFeaturedItems","removeItemFromMultiSelectedItems","removeItemFromMultiFeaturedItems","selectItem","onMouseOver","onMouseLeave","onMouseDown","style","transform","onMouseUp","width","componentWillLoad","_a","_b","multiSelect","closest","featuredItems","includes","selectedItems","noDuplicates","items","toArray","filter","item","index","inputArray","indexOf","selectedItemsArray","push","setAttribute","toString","selectedItem","featuredItemsArray","featured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ainChecker/./node_modules/@rocketspark/flint-ui/dist/esm/rs-multi-select-item.entry.js"],"sourcesContent":["import { r as registerInstance, h, H as Host, g as getElement } from './index-def1ecaa.js';\n\nconst star = `<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M0.540428 7.15015L0.5 7.24448V7.34711C0.5 7.35157 0.499996 7.3562 0.499992 7.36098C0.499906 7.46953 0.499756 7.65797 0.541209 7.84154C0.584229 8.03205 0.6894 8.2951 0.958339 8.46062L4.9385 11.2773L3.38064 16.012C3.2564 16.268 3.27391 16.5435 3.35288 16.7589C3.42334 16.9511 3.55937 17.1423 3.75881 17.2656C3.848 17.3552 3.95447 17.4227 4.08022 17.4614C4.20916 17.501 4.33666 17.5003 4.39316 17.5C4.39753 17.5 4.40147 17.5 4.40496 17.5C4.4084 17.5 4.41223 17.5 4.41641 17.5C4.51791 17.5006 4.83213 17.5023 5.07744 17.2375L8.94161 14.4382L13.0478 17.2574C13.1526 17.3534 13.2704 17.4249 13.4081 17.4642C13.5357 17.5007 13.6568 17.5002 13.7158 17.5C13.7199 17.5 13.7238 17.5 13.7273 17.5C13.7297 17.5 13.7324 17.5 13.7354 17.5C13.7845 17.5002 13.8997 17.5006 14.0272 17.4614C14.1457 17.4249 14.2516 17.3632 14.3479 17.2803C14.6058 17.1286 14.7068 16.8737 14.7472 16.7004C14.7896 16.5191 14.7894 16.3288 14.7893 16.2213C14.7893 16.2162 14.7893 16.2113 14.7893 16.2066V16.1205L14.7605 16.0394L13.0689 11.2721L17.0417 8.46062C17.3106 8.29509 17.4158 8.03204 17.4588 7.84153C17.5002 7.65798 17.5001 7.46955 17.5 7.36101C17.5 7.35622 17.5 7.35158 17.5 7.34711V7.24448L17.4596 7.15015C17.2562 6.67562 16.7959 6.51654 16.438 6.51654H11.5861L9.99137 1.24176C9.98071 1.13789 9.95029 1.03139 9.89167 0.930361C9.81604 0.800036 9.70971 0.706786 9.59727 0.643232C9.389 0.525513 9.14368 0.5 8.93388 0.5C8.75728 0.5 8.53929 0.536262 8.34988 0.665868C8.15949 0.796141 8.03329 0.998601 8.00858 1.24195L6.41394 6.51654H1.56198C1.20412 6.51654 0.743795 6.67562 0.540428 7.15015Z\" stroke=\"#2C3035\"/>\n</svg>\n`;\n\nconst rsMultiSelectItemCss = \":host{display:block;position:relative}.multi-select-item__content-container{display:block;padding:8px;box-sizing:border-box;border-radius:7px;box-shadow:inset 0 0 0 1px var(--rs-color-grey-light);transition:box-shadow 0.2s cubic-bezier(0, 0.55, 0.45, 1);position:relative;cursor:pointer;z-index:1}:host(:hover) .multi-select-item__content-container{box-shadow:inset 0 0 0 2px var(--rs-color-grey-300)}:host(.multi-select-item--selected) .multi-select-item__content-container{box-shadow:inset 0 0 0 2px var(--rs-color-primary)}:host(.multi-select-item--selected.multi-select-item--featured){cursor:not-allowed}:host(.multi-select-item--selected.multi-select-item--featured) .multi-select-item__content-container{pointer-events:none}.multi-select-item__icon--tick-container{position:absolute;right:15px;top:15px;opacity:0;transition:opacity 0.15s cubic-bezier(0, 0.55, 0.45, 1);z-index:2;background-color:var(--rs-color-white);padding:1.2px 1.5px 1.5px;display:flex;align-items:center;justify-content:center;border-radius:50%;box-sizing:border-box}.multi-select-item__icon--tick-container-show{opacity:1}.multi-select-item__icon--star{position:absolute;left:15px;top:15px;opacity:0;z-index:3;cursor:pointer;line-height:0;transform:none;transition:opacity 0.15s cubic-bezier(0, 0.55, 0.45, 1), transform 0.2s cubic-bezier(0, 0.55, 0.45, 1)}.multi-select-item__icon--star-show{opacity:1}.multi-select-item__icon--star svg{fill:rgb(255 255 255 / 0.7)}.multi-select-item__icon--star.multi-select-item__icon--star-featured svg{fill:var(--rs-color-highlight)}.multi-select-item__icon--star svg path{transition:stroke 0.15s cubic-bezier(0, 0.55, 0.45, 1);stroke:var(--rs-color-grey-700)}:host(.multi-select-item--selected) .multi-select-item__icon--star svg path,:host(.multi-select-item--featured) .multi-select-item__icon--star svg path{stroke:var(--rs-color-secondary-variant)}.multi-select-item__icon--error{position:absolute;right:20px;top:20px;opacity:1;width:8px;height:8px;background-color:var(--rs-color-negative);border-radius:50%;z-index:2}\";\nconst RsMultiSelectItemStyle0 = rsMultiSelectItemCss;\n\nconst RsMultiSelectItem = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * Determines whether the item is selected or not\n */\n this.selected = false;\n /**\n * Determines whether the item is featured (starred) or not\n */\n this.featured = false;\n /**\n * Item value\n */\n this.value = '';\n /**\n * Width of the item\n */\n this.width = '100%';\n /**\n * Shows a red circle inside the box\n */\n this.error = false;\n /**\n * Determines whether to show the star on hover or not\n */\n this.showStar = false;\n this.getCircleTickIcon = () => {\n return (h(\"span\", { class: {\n 'multi-select-item__icon--tick-container': true,\n 'multi-select-item__icon--tick-container-show': this.selected\n } }, h(\"rs-icon\", { class: \"multi-select-item__icon--tick\", name: \"circle-tick\", color: \"primary-300\", size: 18 })));\n };\n this.getStarIcon = () => {\n return (h(\"div\", { class: {\n 'multi-select-item__icon--star': true,\n 'multi-select-item__icon--star-show': this.showStar || this.featured,\n 'multi-select-item__icon--star-featured': this.featured,\n }, innerHTML: star, onClick: this.starItem, ref: el => this.starIconElement = el }));\n };\n this.getErrorIcon = () => {\n return this.error ? (h(\"span\", { class: \"multi-select-item__icon--error\" })) : '';\n };\n this.starItem = (event) => {\n event.stopImmediatePropagation();\n this.featured = !this.featured;\n if (this.featured) {\n this.selected = true;\n this.pushItemToMultiSelectedItems(this.value);\n this.pushItemToMultiFeaturedItems(this.value);\n }\n else {\n this.selected = false;\n this.removeItemFromMultiSelectedItems(this.value);\n this.removeItemFromMultiFeaturedItems(this.value);\n }\n };\n this.selectItem = () => {\n this.selected = !this.selected;\n if (this.selected) {\n this.pushItemToMultiSelectedItems(this.value);\n }\n else {\n this.removeItemFromMultiSelectedItems(this.value);\n }\n };\n this.onMouseOver = () => {\n this.showStar = true;\n };\n this.onMouseLeave = () => {\n this.showStar = false;\n };\n this.onMouseDown = () => {\n if (this.selected && this.featured) {\n this.starIconElement.style.transform = 'scale(1.3)';\n }\n };\n this.onMouseUp = () => {\n if (this.selected && this.featured) {\n this.starIconElement.style.transform = null;\n }\n };\n }\n componentWillLoad() {\n var _a, _b;\n const multiSelect = this.multiSelect = this.el.closest('rs-multi-select');\n if (multiSelect !== null) {\n this.featured = (_a = this.multiSelect.featuredItems) === null || _a === void 0 ? void 0 : _a.includes(this.value);\n this.selected = ((_b = this.multiSelect.selectedItems) === null || _b === void 0 ? void 0 : _b.includes(this.value)) || this.featured;\n }\n }\n static noDuplicates(items) {\n if (typeof items === 'string') {\n items = RsMultiSelectItem.toArray(items);\n }\n return items === null || items === void 0 ? void 0 : items.filter((item, index, inputArray) => {\n return inputArray.indexOf(item) == index;\n });\n }\n pushItemToMultiSelectedItems(value) {\n let selectedItemsArray = this.multiSelect.selectedItems === '' ? [] : RsMultiSelectItem.toArray(this.multiSelect.selectedItems);\n selectedItemsArray === null || selectedItemsArray === void 0 ? void 0 : selectedItemsArray.push(value);\n selectedItemsArray = RsMultiSelectItem.noDuplicates(selectedItemsArray);\n this.multiSelect.setAttribute('selected-items', selectedItemsArray.toString());\n }\n removeItemFromMultiSelectedItems(value) {\n let selectedItemsArray = this.multiSelect.selectedItems === '' ? [] : RsMultiSelectItem.toArray(this.multiSelect.selectedItems);\n selectedItemsArray = selectedItemsArray === null || selectedItemsArray === void 0 ? void 0 : selectedItemsArray.filter(selectedItem => {\n return selectedItem !== value;\n });\n selectedItemsArray = RsMultiSelectItem.noDuplicates(selectedItemsArray);\n this.multiSelect.setAttribute('selected-items', selectedItemsArray.toString());\n }\n pushItemToMultiFeaturedItems(value) {\n let featuredItemsArray = this.multiSelect.featuredItems === '' ? [] : RsMultiSelectItem.toArray(this.multiSelect.featuredItems);\n featuredItemsArray === null || featuredItemsArray === void 0 ? void 0 : featuredItemsArray.push(value);\n featuredItemsArray = RsMultiSelectItem.noDuplicates(featuredItemsArray);\n this.multiSelect.setAttribute('featured-items', featuredItemsArray.toString());\n }\n removeItemFromMultiFeaturedItems(value) {\n let featuredItemsArray = this.multiSelect.featuredItems === '' ? [] : RsMultiSelectItem.toArray(this.multiSelect.featuredItems);\n featuredItemsArray = featuredItemsArray === null || featuredItemsArray === void 0 ? void 0 : featuredItemsArray.filter(featuredItem => {\n return featuredItem !== value;\n });\n featuredItemsArray = RsMultiSelectItem.noDuplicates(featuredItemsArray);\n this.multiSelect.setAttribute('featured-items', featuredItemsArray.toString());\n }\n static toArray(items) {\n if (typeof items === 'string') {\n return items === null || items === void 0 ? void 0 : items.split(',').map(item => {\n return item.trim();\n });\n }\n return items;\n }\n render() {\n return (h(Host, { key: 'c4d9c2e5a97a0de75d51bd659ea2e3a6e9060c69', class: {\n 'multi-select-item--selected': this.selected,\n 'multi-select-item--featured': this.featured,\n }, onMouseOver: this.onMouseOver, onMouseLeave: this.onMouseLeave, onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp }, this.getStarIcon(), h(\"div\", { key: '8828f1af6724ff4b140951b24b0135f0a10164b2', class: \"multi-select-item__content-container\", style: {\n 'width': this.width\n }, onClick: this.selectItem }, this.getErrorIcon(), this.getCircleTickIcon(), h(\"slot\", { key: '9065424855a61d0c0285b9c1f51107c4fb4a5d95' }))));\n }\n static get assetsDirs() { return [\"assets\"]; }\n get el() { return getElement(this); }\n};\nRsMultiSelectItem.style = RsMultiSelectItemStyle0;\n\nexport { RsMultiSelectItem as rs_multi_select_item };\n\n//# sourceMappingURL=rs-multi-select-item.entry.js.map"],"names":["RsMultiSelectItem","constructor","hostRef","r","this","selected","featured","value","width","error","showStar","getCircleTickIcon","h","class","name","color","size","getStarIcon","innerHTML","onClick","starItem","ref","el","starIconElement","getErrorIcon","event","stopImmediatePropagation","pushItemToMultiSelectedItems","pushItemToMultiFeaturedItems","removeItemFromMultiSelectedItems","removeItemFromMultiFeaturedItems","selectItem","onMouseOver","onMouseLeave","onMouseDown","style","transform","onMouseUp","componentWillLoad","_a","_b","multiSelect","closest","featuredItems","includes","selectedItems","noDuplicates","items","toArray","filter","item","index","inputArray","indexOf","selectedItemsArray","push","setAttribute","toString","selectedItem","featuredItemsArray","featuredItem","split","map","trim","render","H","key","assetsDirs","g"],"sourceRoot":""}
|