smoothly 1.1.1-alpha.21 → 1.1.1-alpha.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/smoothly-app_95.cjs.entry.js +6 -6
- package/dist/cjs/smoothly-app_95.cjs.entry.js.map +1 -1
- package/dist/collection/components/calendar/style.css +36 -22
- package/dist/collection/components/filter/style.css +6 -4
- package/dist/collection/components/input/date/range/style.css +1 -0
- package/dist/collection/components/input/date/style.css +1 -0
- package/dist/collection/components/input/style.css +0 -1
- package/dist/collection/components/item/style.css +5 -2
- package/dist/components/{p-d4a36c0e.js → p-1dfa73db.js} +3 -3
- package/dist/components/{p-d4a36c0e.js.map → p-1dfa73db.js.map} +1 -1
- package/dist/components/{p-c6e5608f.js → p-38ef76a8.js} +5 -5
- package/dist/components/{p-c6e5608f.js.map → p-38ef76a8.js.map} +1 -1
- package/dist/components/{p-0c409b98.js → p-395f2d30.js} +4 -4
- package/dist/components/{p-0c409b98.js.map → p-395f2d30.js.map} +1 -1
- package/dist/components/{p-64342f9c.js → p-48fcebd3.js} +3 -3
- package/dist/components/{p-64342f9c.js.map → p-48fcebd3.js.map} +1 -1
- package/dist/components/{p-9fa4b6d0.js → p-533b5124.js} +2 -2
- package/dist/components/{p-9fa4b6d0.js.map → p-533b5124.js.map} +1 -1
- package/dist/components/{p-e73096f5.js → p-553d66f2.js} +5 -5
- package/dist/components/p-553d66f2.js.map +1 -0
- package/dist/components/{p-b95284aa.js → p-59c5dec0.js} +2 -2
- package/dist/components/{p-b95284aa.js.map → p-59c5dec0.js.map} +1 -1
- package/dist/components/{p-1743a7e2.js → p-6e1d34f1.js} +3 -3
- package/dist/components/{p-1743a7e2.js.map → p-6e1d34f1.js.map} +1 -1
- package/dist/components/{p-342939e0.js → p-70aee140.js} +4 -4
- package/dist/components/{p-342939e0.js.map → p-70aee140.js.map} +1 -1
- package/dist/components/{p-798e9f7c.js → p-84425325.js} +2 -2
- package/dist/components/{p-798e9f7c.js.map → p-84425325.js.map} +1 -1
- package/dist/components/{p-5569639d.js → p-bfa3193e.js} +2 -2
- package/dist/components/{p-5569639d.js.map → p-bfa3193e.js.map} +1 -1
- package/dist/components/{p-fe55a54e.js → p-c8cfe6cd.js} +7 -7
- package/dist/components/p-c8cfe6cd.js.map +1 -0
- package/dist/components/{p-229cf51b.js → p-d6ba71a4.js} +2 -2
- package/dist/components/{p-229cf51b.js.map → p-d6ba71a4.js.map} +1 -1
- package/dist/components/{p-50d5fb98.js → p-d7242817.js} +2 -2
- package/dist/components/{p-50d5fb98.js.map → p-d7242817.js.map} +1 -1
- package/dist/components/{p-488297a3.js → p-df721dfc.js} +2 -2
- package/dist/components/p-df721dfc.js.map +1 -0
- package/dist/components/{p-e23bc122.js → p-e13d98d0.js} +8 -8
- package/dist/components/{p-e23bc122.js.map → p-e13d98d0.js.map} +1 -1
- package/dist/components/{p-db26a36c.js → p-e15ce98c.js} +7 -7
- package/dist/components/p-e15ce98c.js.map +1 -0
- package/dist/components/{p-9f010bc0.js → p-e4d90d09.js} +4 -4
- package/dist/components/p-e4d90d09.js.map +1 -0
- package/dist/components/{p-67e3f6ba.js → p-e584d156.js} +2 -2
- package/dist/components/p-e584d156.js.map +1 -0
- package/dist/components/{p-6b68c185.js → p-e79dc7fb.js} +2 -2
- package/dist/components/{p-6b68c185.js.map → p-e79dc7fb.js.map} +1 -1
- package/dist/components/{p-88e2b22e.js → p-f2914f55.js} +10 -10
- package/dist/components/{p-88e2b22e.js.map → p-f2914f55.js.map} +1 -1
- package/dist/components/{p-b75ab804.js → p-f2d454ba.js} +13 -13
- package/dist/components/{p-b75ab804.js.map → p-f2d454ba.js.map} +1 -1
- package/dist/components/{p-499be380.js → p-f7b7b902.js} +3 -3
- package/dist/components/{p-499be380.js.map → p-f7b7b902.js.map} +1 -1
- package/dist/components/smoothly-address-display.js +1 -1
- package/dist/components/smoothly-address.js +1 -1
- package/dist/components/smoothly-addresses.js +3 -3
- package/dist/components/smoothly-app-demo.js +21 -21
- package/dist/components/smoothly-calendar.js +1 -1
- package/dist/components/smoothly-filter-field.js +1 -1
- package/dist/components/smoothly-filter-input.js +1 -1
- package/dist/components/smoothly-filter-picker.js +1 -1
- package/dist/components/smoothly-filter.js +1 -1
- package/dist/components/smoothly-input-color.js +1 -1
- package/dist/components/smoothly-input-date-range.js +1 -1
- package/dist/components/smoothly-input-date.js +1 -1
- package/dist/components/smoothly-input-demo-controlled-form.js +1 -1
- package/dist/components/smoothly-input-demo.js +1 -1
- package/dist/components/smoothly-input-month.js +1 -1
- package/dist/components/smoothly-input-select.js +1 -1
- package/dist/components/smoothly-input.js +1 -1
- package/dist/components/smoothly-item.js +1 -1
- package/dist/components/smoothly-picker-demo.js +1 -1
- package/dist/components/smoothly-picker-menu.js +1 -1
- package/dist/components/smoothly-picker.js +1 -1
- package/dist/components/smoothly-table-demo-filtered.js +1 -1
- package/dist/components/smoothly-table-demo.js +1 -1
- package/dist/components/smoothly-table-testing.js +1 -1
- package/dist/components/smoothly-theme-picker.js +1 -1
- package/dist/esm/smoothly-app_95.entry.js +6 -6
- package/dist/esm/smoothly-app_95.entry.js.map +1 -1
- package/dist/smoothly/p-535d2b01.entry.js +2 -0
- package/dist/smoothly/p-535d2b01.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-488297a3.js.map +0 -1
- package/dist/components/p-67e3f6ba.js.map +0 -1
- package/dist/components/p-9f010bc0.js.map +0 -1
- package/dist/components/p-db26a36c.js.map +0 -1
- package/dist/components/p-e73096f5.js.map +0 -1
- package/dist/components/p-fe55a54e.js.map +0 -1
- package/dist/smoothly/p-84da94cd.entry.js +0 -2
- package/dist/smoothly/p-84da94cd.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-59c5dec0.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,0CAA0C,CAAC;AAC5D,kCAAe,QAAQ;;MCOV,mBAAmB;;;;;;;IAK/B,MAAM,KAAK;;QACV,OAAM,MAAA,IAAI,CAAC,KAAK,0CAAE,KAAK,EAAE,CAAA,CAAA;KACzB;IACD,eAAe;;QACd,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAACA,KAAiB,CAAC,MAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,KAAK,mCAAI,EAAE,CAAC,CAAC,CAAA;KACzE;IACD,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,SAAS,EAAE,CAAC,CAAgB,KAAK,CAAC,CAAC,GAAG,IAAI,OAAO,IAAI,IAAI,CAAC,eAAe,EAAE,IAChF,uEACC,IAAI,EAAC,QAAQ,EACb,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAC1B,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAC/B,oBAAoB,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAC9C,cAAc,EAAE,CAAC;gBAChB,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,IAAI,CAAC,eAAe,EAAE,CAAA;aACtB,EACD,qBAAqB,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAC/C,mBAAmB,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAC7C,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAC1C,eAAe,EAAE,CAAC;gBACjB,CAAC,CAAC,eAAe,EAAE,CAAA;aACnB,aAEe,CACX,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["selectively.parse"],"sources":["src/components/filter/field/style.css?tag=smoothly-filter-field&encapsulation=scoped","src/components/filter/field/index.tsx"],"sourcesContent":[":host {\n\tflex-grow: 5;\n}\n\n","import { Component, Event, EventEmitter, h, Host, Method, Prop } from \"@stencil/core\"\nimport { selectively } from \"selectively\"\n\n@Component({\n\ttag: \"smoothly-filter-field\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyFilterField {\n\tinput: HTMLSmoothlyInputElement | undefined\n\t@Prop() criteria: selectively.Criteria\n\t@Event() smoothlyFilterField: EventEmitter<selectively.Rule>\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tawait this.input?.clear()\n\t}\n\tfilterFieldEmit() {\n\t\tthis.smoothlyFilterField.emit(selectively.parse(this.input?.value ?? \"\"))\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host onKeyDown={(e: KeyboardEvent) => e.key == \"Enter\" && this.filterFieldEmit()}>\n\t\t\t\t<smoothly-input\n\t\t\t\t\tname=\"filter\"\n\t\t\t\t\tref={e => (this.input = e)}\n\t\t\t\t\tvalue={this.criteria.toString()}\n\t\t\t\t\tonSmoothlyInputLooks={e => e.stopPropagation()}\n\t\t\t\t\tonSmoothlyBlur={e => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tthis.filterFieldEmit()\n\t\t\t\t\t}}\n\t\t\t\t\tonSmoothlyFormDisable={e => e.stopPropagation()}\n\t\t\t\t\tonSmoothlyInputLoad={e => e.stopPropagation()}\n\t\t\t\t\tonSmoothlyChange={e => e.stopPropagation()}\n\t\t\t\t\tonSmoothlyInput={e => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t}}>\n\t\t\t\t\tFilter\n\t\t\t\t</smoothly-input>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, d as Host } from './p-5963f898.js';
|
|
2
2
|
import { d as defineCustomElement$3 } from './p-b1fbd693.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
4
|
-
import { d as defineCustomElement$1 } from './p-
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-d6ba71a4.js';
|
|
4
|
+
import { d as defineCustomElement$1 } from './p-df721dfc.js';
|
|
5
5
|
|
|
6
6
|
const styleCss = "";
|
|
7
7
|
const SmoothlyThemePickerStyle0 = styleCss;
|
|
@@ -55,4 +55,4 @@ defineCustomElement();
|
|
|
55
55
|
|
|
56
56
|
export { SmoothlyThemePicker as S, defineCustomElement as d };
|
|
57
57
|
|
|
58
|
-
//# sourceMappingURL=p-
|
|
58
|
+
//# sourceMappingURL=p-6e1d34f1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-6e1d34f1.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,EAAE,CAAC;AACpB,kCAAe,QAAQ;;MCMV,mBAAmB;;;;uBACb,cAAc;;IAChC,MAAM;QACL,QACC,EAAC,IAAI,uDACJ,8EACC,IAAI,EAAC,OAAO,EACZ,eAAe,EAAE,CAAC;gBACjB,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;gBAC1D,IAAI,OAAO,YAAY,eAAe,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,QAAQ;oBAC1E,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAA;aAC9B,IACD,8DAAa,CACU,CAClB,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/theme/picker/style.css?tag=smoothly-theme-picker&encapsulation=scoped","src/components/theme/picker/index.tsx"],"sourcesContent":["","import { Component, h, Host, Prop } from \"@stencil/core\"\n\n@Component({\n\ttag: \"smoothly-theme-picker\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyThemePicker {\n\t@Prop() element = \"smoothly-css\"\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<smoothly-input-select\n\t\t\t\t\tname=\"theme\"\n\t\t\t\t\tonSmoothlyInput={e => {\n\t\t\t\t\t\tconst element = document.querySelector(`#${this.element}`)\n\t\t\t\t\t\tif (element instanceof HTMLLinkElement && typeof e.detail.theme == \"string\")\n\t\t\t\t\t\t\telement.href = e.detail.theme\n\t\t\t\t\t}}>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</smoothly-input-select>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -3,9 +3,9 @@ import { A as And, P as Property, W as Within, C as Contains, c as Is, d as cont
|
|
|
3
3
|
import { i as is } from './p-5ae9e20e.js';
|
|
4
4
|
import { s as string } from './p-20c5f1b5.js';
|
|
5
5
|
import { d as defineCustomElement$7 } from './p-b1fbd693.js';
|
|
6
|
-
import { d as defineCustomElement$6 } from './p-
|
|
7
|
-
import { d as defineCustomElement$5 } from './p-
|
|
8
|
-
import { d as defineCustomElement$4 } from './p-
|
|
6
|
+
import { d as defineCustomElement$6 } from './p-e584d156.js';
|
|
7
|
+
import { d as defineCustomElement$5 } from './p-f7b7b902.js';
|
|
8
|
+
import { d as defineCustomElement$4 } from './p-d7242817.js';
|
|
9
9
|
import { d as defineCustomElement$3 } from './p-ef360b5d.js';
|
|
10
10
|
import { d as defineCustomElement$2 } from './p-f4e48a77.js';
|
|
11
11
|
import { d as defineCustomElement$1 } from './p-c569a63b.js';
|
|
@@ -173,4 +173,4 @@ defineCustomElement();
|
|
|
173
173
|
|
|
174
174
|
export { SmoothlyFilterPicker as S, defineCustomElement as d };
|
|
175
175
|
|
|
176
|
-
//# sourceMappingURL=p-
|
|
176
|
+
//# sourceMappingURL=p-70aee140.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-342939e0.js","mappings":";;;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,gJAAgJ,CAAC;AAClK,mCAAe,QAAQ;;MCWV,oBAAoB;;;;;;;QAChC,aAAQ,GAAG,KAAK,CAAA;QAChB,YAAO,GAAuF,IAAI,GAAG,EAGlG,CAAA;;;wBAIgB,KAAK;oBACW,QAAQ;qBACpB,OAAO;;IAI9B,gBAAgB;QACf,IAA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CAAC,CAAC,IAC1C,IAAI,CAAC,KAAK,KACV,6DAAM,IAAI,EAAC,OAAO,IAChB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAClF,CACP,EACD,6DAAM,IAAI,EAAC,QAAQ,aAAc,EACjC,8DAAQ,CACS,EAClB;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["selectively.And","selectively.Property","selectively.Within","selectively.Contains","selectively.Is","selectively.Rule","selectively.and","isly.string","selectively.contains","selectively.within","selectively.is","selectively.property"],"sources":["src/components/filter/picker/style.css?tag=smoothly-filter-picker&encapsulation=scoped","src/components/filter/picker/index.tsx"],"sourcesContent":[":host {\n\tdisplay: contents;\n}\n\n:host>smoothly-picker {\n\tflex-grow: 1;\n\twidth: 12.5em;\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop } from \"@stencil/core\"\nimport { selectively } from \"selectively\"\nimport { isly } from \"isly\"\nimport { Option } from \"../../../model\"\nimport { Looks } from \"../../input/Looks\"\nimport { Filter } from \"../Filter\"\n\n@Component({\n\ttag: \"smoothly-filter-picker\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyFilterPicker implements Filter {\n\tupdating = false\n\toptions: Map<string, { state: Record<string, any>; selected: (selected: boolean) => void }> = new Map<\n\t\tstring,\n\t\t{ state: Record<string, any>; selected: (selected: boolean) => void }\n\t>()\n\t@Element() element: HTMLSmoothlyFilterPickerElement\n\t@Prop() label: string\n\t@Prop() property: string\n\t@Prop() multiple = false\n\t@Prop() type: \"array\" | \"string\" = \"string\"\n\t@Prop() looks: Looks = \"plain\"\n\t@Event() smoothlyFilterUpdate: EventEmitter<Filter.Update>\n\t@Event() smoothlyFilterManipulate: EventEmitter<Filter.Manipulate>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks) => void>\n\tcomponentDidLoad() {\n\t\tthis.smoothlyInputLooks.emit(looks => (this.looks = looks))\n\t\tthis.smoothlyFilterUpdate.emit(this.update.bind(this))\n\t}\n\t@Listen(\"smoothlyPickerOptionChange\")\n\toptionChangeHandler(event: CustomEvent<Option>) {\n\t\tevent.stopPropagation()\n\t\tthis.options.set(event.detail.value, {\n\t\t\tstate: this.property.split(\".\").reduceRight((r, e) => ({ [e]: r }), event.detail.value),\n\t\t\tselected: event.detail.set.selected,\n\t\t})\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks) => void>): void {\n\t\tif (event.target != this.element) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.detail(this.looks)\n\t\t}\n\t}\n\tupdate(expression: selectively.Criteria): void {\n\t\tthis.updating = true\n\t\tif (expression instanceof selectively.And && expression.rules.length > 0)\n\t\t\tfor (const option of this.options.values()) {\n\t\t\t\toption.selected(\n\t\t\t\t\texpression.rules.some(\n\t\t\t\t\t\tr =>\n\t\t\t\t\t\t\tthis.isCriteria(r, this.property, option.state) &&\n\t\t\t\t\t\t\t(this.type == \"array\" ? this.findInstanceOf(r, this.property) : r.is(option.state))\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t}\n\t\telse\n\t\t\tthis.options.forEach(o => o.selected(false))\n\t\tthis.updating = false\n\t}\n\tprivate isCriteria(criteria: selectively.Rule | undefined, key: string, value: Record<string, any> | any): boolean {\n\t\tconst [property, ...rest] = key.split(\".\")\n\t\treturn criteria instanceof selectively.Property && criteria.name == property\n\t\t\t? this.isCriteria(criteria.criteria, rest.join(\".\"), value[property])\n\t\t\t: this.multiple\n\t\t\t? (criteria instanceof selectively.Within && criteria.value.some(e => e == value)) ||\n\t\t\t (this.type == \"array\" && criteria instanceof selectively.Contains && criteria.criteria.some(e => e == value))\n\t\t\t: criteria instanceof selectively.Is && criteria.value == value\n\t}\n\tpickerHandler(event: CustomEvent<Record<string, unknown>>) {\n\t\tevent.stopPropagation()\n\t\tif (!this.updating) {\n\t\t\tconst argument = event.detail[this.property]\n\t\t\tconst manipulate = (criteria: selectively.Criteria): selectively.Criteria => {\n\t\t\t\tlet result: selectively.Criteria = criteria\n\t\t\t\tconst newCriteria = this.getCriteria(argument)\n\t\t\t\tif (!(result instanceof selectively.Rule))\n\t\t\t\t\tresult = newCriteria ? selectively.and(result, newCriteria) : result\n\t\t\t\telse if (result instanceof selectively.And) {\n\t\t\t\t\tconst index = result.rules.findIndex(r => this.findInstanceOf(r, this.property))\n\t\t\t\t\t!newCriteria && index >= 0\n\t\t\t\t\t\t? result.rules.splice(index, 1)\n\t\t\t\t\t\t: !newCriteria\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: index == -1\n\t\t\t\t\t\t? result.rules.push(newCriteria)\n\t\t\t\t\t\t: (result.rules[index] = newCriteria)\n\t\t\t\t\tresult = selectively.and(...result.rules)\n\t\t\t\t}\n\t\t\t\treturn result\n\t\t\t}\n\t\t\tthis.smoothlyFilterManipulate.emit(manipulate.bind(this))\n\t\t}\n\t}\n\tfindInstanceOf(criteria: selectively.Criteria, key: string): boolean {\n\t\tconst [property, ...rest] = key.split(\".\")\n\t\treturn (\n\t\t\tcriteria instanceof selectively.Property &&\n\t\t\tcriteria.name == property &&\n\t\t\t(criteria.criteria instanceof selectively.Within ||\n\t\t\t\tcriteria.criteria instanceof selectively.Is ||\n\t\t\t\tcriteria.criteria instanceof selectively.Contains ||\n\t\t\t\t(criteria.criteria instanceof selectively.Property && this.findInstanceOf(criteria.criteria, rest.join(\".\"))))\n\t\t)\n\t}\n\tprivate getCriteria(detail: unknown): selectively.Rule | undefined {\n\t\tlet result: selectively.Criteria | undefined\n\t\tif (this.multiple && isly.string().array({ criteria: \"minLength\", value: 1 }).is(detail))\n\t\t\tresult = this.type == \"array\" ? selectively.contains(detail) : selectively.within(detail)\n\t\telse if (typeof detail == \"string\")\n\t\t\tresult = selectively.is(detail)\n\t\telse\n\t\t\tresult = undefined\n\t\treturn result && this.property.split(\".\").reduceRight((r, e) => selectively.property(e, r), result)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<smoothly-picker\n\t\t\t\tname={this.property}\n\t\t\t\tlooks={this.looks}\n\t\t\t\tmultiple={this.multiple}\n\t\t\t\tonSmoothlyInputLooks={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyChange={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyPickerLoaded={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyInput={e => this.pickerHandler(e)}>\n\t\t\t\t{this.label && (\n\t\t\t\t\t<span slot=\"label\">\n\t\t\t\t\t\t{[this.label.slice(0, 1).toUpperCase(), this.label.slice(1, this.label.length)].join(\"\")}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t<slot />\n\t\t\t</smoothly-picker>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-70aee140.js","mappings":";;;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,gJAAgJ,CAAC;AAClK,mCAAe,QAAQ;;MCWV,oBAAoB;;;;;;;QAChC,aAAQ,GAAG,KAAK,CAAA;QAChB,YAAO,GAAuF,IAAI,GAAG,EAGlG,CAAA;;;wBAIgB,KAAK;oBACW,QAAQ;qBACpB,OAAO;;IAI9B,gBAAgB;QACf,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAA;QAC3D,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;KACtD;IAED,mBAAmB,CAAC,KAA0B;QAC7C,KAAK,CAAC,eAAe,EAAE,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,CAAC,EAAE,CAAC,CAClF,CACP,EACD,6DAAM,IAAI,EAAC,QAAQ,aAAc,EACjC,8DAAQ,CACS,EAClB;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["selectively.And","selectively.Property","selectively.Within","selectively.Contains","selectively.Is","selectively.Rule","selectively.and","isly.string","selectively.contains","selectively.within","selectively.is","selectively.property"],"sources":["src/components/filter/picker/style.css?tag=smoothly-filter-picker&encapsulation=scoped","src/components/filter/picker/index.tsx"],"sourcesContent":[":host {\n\tdisplay: contents;\n}\n\n:host>smoothly-picker {\n\tflex-grow: 1;\n\twidth: 12.5em;\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop } from \"@stencil/core\"\nimport { selectively } from \"selectively\"\nimport { isly } from \"isly\"\nimport { Option } from \"../../../model\"\nimport { Looks } from \"../../input/Looks\"\nimport { Filter } from \"../Filter\"\n\n@Component({\n\ttag: \"smoothly-filter-picker\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyFilterPicker implements Filter {\n\tupdating = false\n\toptions: Map<string, { state: Record<string, any>; selected: (selected: boolean) => void }> = new Map<\n\t\tstring,\n\t\t{ state: Record<string, any>; selected: (selected: boolean) => void }\n\t>()\n\t@Element() element: HTMLSmoothlyFilterPickerElement\n\t@Prop() label: string\n\t@Prop() property: string\n\t@Prop() multiple = false\n\t@Prop() type: \"array\" | \"string\" = \"string\"\n\t@Prop() looks: Looks = \"plain\"\n\t@Event() smoothlyFilterUpdate: EventEmitter<Filter.Update>\n\t@Event() smoothlyFilterManipulate: EventEmitter<Filter.Manipulate>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks) => void>\n\tcomponentDidLoad() {\n\t\tthis.smoothlyInputLooks.emit(looks => (this.looks = looks))\n\t\tthis.smoothlyFilterUpdate.emit(this.update.bind(this))\n\t}\n\t@Listen(\"smoothlyPickerOptionChange\")\n\toptionChangeHandler(event: CustomEvent<Option>) {\n\t\tevent.stopPropagation()\n\t\tthis.options.set(event.detail.value, {\n\t\t\tstate: this.property.split(\".\").reduceRight((r, e) => ({ [e]: r }), event.detail.value),\n\t\t\tselected: event.detail.set.selected,\n\t\t})\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks) => void>): void {\n\t\tif (event.target != this.element) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.detail(this.looks)\n\t\t}\n\t}\n\tupdate(expression: selectively.Criteria): void {\n\t\tthis.updating = true\n\t\tif (expression instanceof selectively.And && expression.rules.length > 0)\n\t\t\tfor (const option of this.options.values()) {\n\t\t\t\toption.selected(\n\t\t\t\t\texpression.rules.some(\n\t\t\t\t\t\tr =>\n\t\t\t\t\t\t\tthis.isCriteria(r, this.property, option.state) &&\n\t\t\t\t\t\t\t(this.type == \"array\" ? this.findInstanceOf(r, this.property) : r.is(option.state))\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t}\n\t\telse\n\t\t\tthis.options.forEach(o => o.selected(false))\n\t\tthis.updating = false\n\t}\n\tprivate isCriteria(criteria: selectively.Rule | undefined, key: string, value: Record<string, any> | any): boolean {\n\t\tconst [property, ...rest] = key.split(\".\")\n\t\treturn criteria instanceof selectively.Property && criteria.name == property\n\t\t\t? this.isCriteria(criteria.criteria, rest.join(\".\"), value[property])\n\t\t\t: this.multiple\n\t\t\t? (criteria instanceof selectively.Within && criteria.value.some(e => e == value)) ||\n\t\t\t (this.type == \"array\" && criteria instanceof selectively.Contains && criteria.criteria.some(e => e == value))\n\t\t\t: criteria instanceof selectively.Is && criteria.value == value\n\t}\n\tpickerHandler(event: CustomEvent<Record<string, unknown>>) {\n\t\tevent.stopPropagation()\n\t\tif (!this.updating) {\n\t\t\tconst argument = event.detail[this.property]\n\t\t\tconst manipulate = (criteria: selectively.Criteria): selectively.Criteria => {\n\t\t\t\tlet result: selectively.Criteria = criteria\n\t\t\t\tconst newCriteria = this.getCriteria(argument)\n\t\t\t\tif (!(result instanceof selectively.Rule))\n\t\t\t\t\tresult = newCriteria ? selectively.and(result, newCriteria) : result\n\t\t\t\telse if (result instanceof selectively.And) {\n\t\t\t\t\tconst index = result.rules.findIndex(r => this.findInstanceOf(r, this.property))\n\t\t\t\t\t!newCriteria && index >= 0\n\t\t\t\t\t\t? result.rules.splice(index, 1)\n\t\t\t\t\t\t: !newCriteria\n\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t: index == -1\n\t\t\t\t\t\t? result.rules.push(newCriteria)\n\t\t\t\t\t\t: (result.rules[index] = newCriteria)\n\t\t\t\t\tresult = selectively.and(...result.rules)\n\t\t\t\t}\n\t\t\t\treturn result\n\t\t\t}\n\t\t\tthis.smoothlyFilterManipulate.emit(manipulate.bind(this))\n\t\t}\n\t}\n\tfindInstanceOf(criteria: selectively.Criteria, key: string): boolean {\n\t\tconst [property, ...rest] = key.split(\".\")\n\t\treturn (\n\t\t\tcriteria instanceof selectively.Property &&\n\t\t\tcriteria.name == property &&\n\t\t\t(criteria.criteria instanceof selectively.Within ||\n\t\t\t\tcriteria.criteria instanceof selectively.Is ||\n\t\t\t\tcriteria.criteria instanceof selectively.Contains ||\n\t\t\t\t(criteria.criteria instanceof selectively.Property && this.findInstanceOf(criteria.criteria, rest.join(\".\"))))\n\t\t)\n\t}\n\tprivate getCriteria(detail: unknown): selectively.Rule | undefined {\n\t\tlet result: selectively.Criteria | undefined\n\t\tif (this.multiple && isly.string().array({ criteria: \"minLength\", value: 1 }).is(detail))\n\t\t\tresult = this.type == \"array\" ? selectively.contains(detail) : selectively.within(detail)\n\t\telse if (typeof detail == \"string\")\n\t\t\tresult = selectively.is(detail)\n\t\telse\n\t\t\tresult = undefined\n\t\treturn result && this.property.split(\".\").reduceRight((r, e) => selectively.property(e, r), result)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<smoothly-picker\n\t\t\t\tname={this.property}\n\t\t\t\tlooks={this.looks}\n\t\t\t\tmultiple={this.multiple}\n\t\t\t\tonSmoothlyInputLooks={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyChange={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyPickerLoaded={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyInput={e => this.pickerHandler(e)}>\n\t\t\t\t{this.label && (\n\t\t\t\t\t<span slot=\"label\">\n\t\t\t\t\t\t{[this.label.slice(0, 1).toUpperCase(), this.label.slice(1, this.label.length)].join(\"\")}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<span slot=\"search\">Search</span>\n\t\t\t\t<slot />\n\t\t\t</smoothly-picker>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-5963f898.js';
|
|
2
2
|
import { d as defineCustomElement$2 } from './p-b1fbd693.js';
|
|
3
|
-
import { d as defineCustomElement$1 } from './p-
|
|
3
|
+
import { d as defineCustomElement$1 } from './p-e584d156.js';
|
|
4
4
|
|
|
5
5
|
const styleCss = ".sc-smoothly-input-color-h{display:flex}.sc-smoothly-input-color-h>smoothly-input.sc-smoothly-input-color{width:100%}.sc-smoothly-input-color-h>div.color-sample.sc-smoothly-input-color{height:2em;width:5em;background-color:var(--value);border:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px;border-radius:2px}";
|
|
6
6
|
const SmoothlyInputColorStyle0 = styleCss;
|
|
@@ -87,4 +87,4 @@ defineCustomElement();
|
|
|
87
87
|
|
|
88
88
|
export { SmoothlyInputColor as S, defineCustomElement as d };
|
|
89
89
|
|
|
90
|
-
//# sourceMappingURL=p-
|
|
90
|
+
//# sourceMappingURL=p-84425325.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-84425325.js","mappings":";;;;AAAA,MAAM,QAAQ,GAAG,wUAAwU,CAAC;AAC1V,iCAAe,QAAQ;;MCyBV,kBAAkB;;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B,eAAe,EAAE,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,aAElD,4DAAK,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,cAAc,GAAO,CAC3B,CACX,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/input/color/style.css?tag=smoothly-input-color&encapsulation=scoped","src/components/input/color/index.tsx"],"sourcesContent":[":host {\n\tdisplay: flex;\n}\n\n:host > smoothly-input { \n\twidth: 100% /* Element doesnt take up all its avaliable space without this*/\n}\n\n:host > div.color-sample {\n\theight: 2em;\n\twidth: 5em;\n\tbackground-color: var(--value);\n\tborder: rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px;\n\tborder-radius: 2px;\n}\n","import {\n\tComponent,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tMethod,\n\tProp,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { SmoothlyInputCustomEvent } from \"../../../components\"\nimport { Color } from \"../../../model\"\nimport { Clearable } from \"../Clearable\"\nimport { SmoothlyInput } from \"../index\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n\n@Component({\n\ttag: \"smoothly-input-color\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputColor implements Input, Clearable, ComponentWillLoad {\n\t@Element() element: HTMLElement\n\t@Prop({ mutable: true }) value: string | undefined\n\t@Prop({ mutable: true, reflect: true }) looks: Looks = \"plain\"\n\t@Prop() name: string\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\t@Event() smoothlyInput: EventEmitter<Record<string, any>>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\tcomponentWillLoad(): void | Promise<void> {\n\t\tthis.smoothlyInputLooks.emit(looks => (this.looks = looks))\n\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t\tthis.smoothlyInputLoad.emit(() => {\n\t\t\treturn\n\t\t})\n\t}\n\t@Listen(\"smoothlyInput\")\n\tsmoothlyInputHandler(event: CustomEvent<Record<string, any>>): void {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks) => void>): void {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tsmoothlyInputLoadHandler(event: CustomEvent<(parent: SmoothlyInput) => void>): void {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tthis.value = undefined\n\t}\n\t@Watch(\"value\")\n\tvalueChanged(): void {\n\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t}\n\tinputHandler(event: SmoothlyInputCustomEvent<Record<string, any>>): void {\n\t\tthis.value = event.detail[this.name]\n\t}\n\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host style={{ \"--value\": this.value }}>\n\t\t\t\t<smoothly-input\n\t\t\t\t\tvalue={this.value}\n\t\t\t\t\tname={this.name}\n\t\t\t\t\tlooks={this.looks}\n\t\t\t\t\tonSmoothlyInput={event => this.inputHandler(event)}>\n\t\t\t\t\tColor\n\t\t\t\t\t<div slot=\"end\" class=\"color-sample\"></div>\n\t\t\t\t</smoothly-input>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-5963f898.js';
|
|
2
2
|
import { A as And, P as Property, I as Includes, b as property, i as includes, a as and } from './p-caf09da9.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './p-b1fbd693.js';
|
|
4
|
-
import { d as defineCustomElement$1 } from './p-
|
|
4
|
+
import { d as defineCustomElement$1 } from './p-e584d156.js';
|
|
5
5
|
|
|
6
6
|
const styleCss = ".sc-smoothly-filter-input-h{display:block}";
|
|
7
7
|
const SmoothlyFilterInputStyle0 = styleCss;
|
|
@@ -107,4 +107,4 @@ defineCustomElement();
|
|
|
107
107
|
|
|
108
108
|
export { SmoothlyFilterInput as S, defineCustomElement as d };
|
|
109
109
|
|
|
110
|
-
//# sourceMappingURL=p-
|
|
110
|
+
//# sourceMappingURL=p-bfa3193e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-bfa3193e.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,4CAA4C,CAAC;AAC9D,kCAAe,QAAQ;;MCSV,mBAAmB;;;;;;QAC/B,SAAI,GAAgB,MAAM,CAAA;sBACc,EAAE;;;;IAK1C,gBAAgB;QACf,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;KACtD;IACD,MAAM,CAAC,UAAgC;;QACtC,IAAI,UAAU,YAAYA,GAAe,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YACvE,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE;gBACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;gBACrD,IAAI,QAAQ,EAAE;oBACb,IAAI,CAAC,MAAM,GAAG,MAAA,QAAQ,CAAC,MAAM,mCAAI,EAAE,CAAA;oBACnC,MAAK;iBACL;aACD;;YAED,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;KACjB;IACO,UAAU,CAAC,QAAsC,EAAE,GAAW;QACrE,MAAM,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC1C,QACC,CAAC,QAAQ,YAAYC,QAAoB;YACxC,QAAQ,CAA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A;KACzD;IACO,WAAW,CAAC,MAAc;QACjC,OAAO,IAAI,CAAC,QAAQ;aAClB,KAAK,CAAC,GAAG,CAAC;aACV,WAAW,CAAC,CAAC,CAAmB,EAAE,CAAC,KAAKC,QAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAEC,QAAoB,CAAC,MAAM,CAAC,CAAC,CAAA;KACnG;IACD,cAAc,CAAC,QAA8B,EAAE,QAAgB;QAC9D,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC1C,QACC,QAAQ,YAAYJ,QAAoB;YACxC,QAAQ,CAAC,IAAI,IAAI,GAAG;aACnB,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EACrG;KACD;IAED,MAAM;QACL,QACC,uEACC,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,cAAc,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EACxC,qBAAqB,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAC/C,mBAAmB,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAC7C,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAC1C,eAAe,EAAE,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAC1C,8DAAQ,CACQ,EACjB;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["selectively.And","selectively.Property","selectively.Includes","selectively.and","selectively.property","selectively.includes"],"sources":["src/components/filter/input/style.css?tag=smoothly-filter-input&encapsulation=scoped","src/components/filter/input/index.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n\n","import { Component, Event, EventEmitter, h, Prop, State } from \"@stencil/core\"\nimport { selectively } from \"selectively\"\nimport { tidily } from \"tidily\"\nimport { Filter } from \"../Filter\"\n\n@Component({\n\ttag: \"smoothly-filter-input\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyFilterInput implements Filter {\n\ttype: tidily.Type = \"text\"\n\t@State() needle: selectively.Criteria = \"\"\n\t@Prop() property: string\n\t@Prop() placeholder: string\n\t@Event() smoothlyFilterUpdate: EventEmitter<Filter.Update>\n\t@Event() smoothlyFilterManipulate: EventEmitter<Filter.Manipulate>\n\tcomponentDidLoad() {\n\t\tthis.smoothlyFilterUpdate.emit(this.update.bind(this))\n\t}\n\tupdate(expression: selectively.Criteria): void {\n\t\tif (expression instanceof selectively.And && expression.rules.length > 0)\n\t\t\tfor (const rule of expression.rules) {\n\t\t\t\tconst criteria = this.isCriteria(rule, this.property)\n\t\t\t\tif (criteria) {\n\t\t\t\t\tthis.needle = criteria.needle ?? \"\"\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\tthis.needle = \"\"\n\t}\n\tprivate isCriteria(criteria: selectively.Rule | undefined, key: string): selectively.Includes | undefined {\n\t\tconst [property, ...rest] = key.split(\".\")\n\t\treturn (\n\t\t\t(criteria instanceof selectively.Property &&\n\t\t\t\tcriteria.name == property &&\n\t\t\t\t((criteria.criteria instanceof selectively.Includes && criteria.criteria) ||\n\t\t\t\t\t(criteria.criteria instanceof selectively.Property && this.isCriteria(criteria.criteria, rest.join(\".\"))))) ||\n\t\t\tundefined\n\t\t)\n\t}\n\tinputHandler(event: CustomEvent<Record<string, string>>) {\n\t\tevent.stopPropagation()\n\t\tconst needle = event.detail[this.property]\n\t\tconst manipulate: Filter.Manipulate = (criteria: selectively.Criteria): selectively.Criteria => {\n\t\t\tlet result: selectively.Criteria = criteria\n\t\t\tconst newCriteria = needle ? this.getCriteria(needle) : undefined\n\t\t\tif (result instanceof selectively.And) {\n\t\t\t\tconst index = result.rules.findIndex(r => this.findInstanceOf(r, this.property))\n\t\t\t\t!newCriteria\n\t\t\t\t\t? index != -1 && result.rules.splice(index, 1)\n\t\t\t\t\t: index == -1\n\t\t\t\t\t? result.rules.push(newCriteria)\n\t\t\t\t\t: (result.rules[index] = newCriteria)\n\t\t\t\tresult = selectively.and(...result.rules)\n\t\t\t}\n\t\t\treturn result\n\t\t}\n\t\tthis.smoothlyFilterManipulate.emit(manipulate.bind(this))\n\t}\n\tprivate getCriteria(needle: string): selectively.Rule | undefined {\n\t\treturn this.property\n\t\t\t.split(\".\")\n\t\t\t.reduceRight((r: selectively.Rule, e) => selectively.property(e, r), selectively.includes(needle))\n\t}\n\tfindInstanceOf(criteria: selectively.Criteria, property: string): boolean {\n\t\tconst [key, ...rest] = property.split(\".\")\n\t\treturn (\n\t\t\tcriteria instanceof selectively.Property &&\n\t\t\tcriteria.name == key &&\n\t\t\t(rest.length == 0 || (!!criteria.criteria && this.findInstanceOf(criteria.criteria, rest.join(\".\"))))\n\t\t)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<smoothly-input\n\t\t\t\tname={this.property}\n\t\t\t\tvalue={this.needle}\n\t\t\t\ttype={this.type}\n\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\tonSmoothlyBlur={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyFormDisable={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyInputLoad={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyChange={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyInput={e => this.inputHandler(e)}>\n\t\t\t\t<slot />\n\t\t\t</smoothly-input>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h } from './p-5963f898.js';
|
|
2
2
|
import { D as Date } from './p-e44d9427.js';
|
|
3
3
|
import { d as defineCustomElement$7 } from './p-2f39a851.js';
|
|
4
|
-
import { d as defineCustomElement$6 } from './p-
|
|
4
|
+
import { d as defineCustomElement$6 } from './p-553d66f2.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './p-b1fbd693.js';
|
|
6
|
-
import { d as defineCustomElement$4 } from './p-
|
|
7
|
-
import { d as defineCustomElement$3 } from './p-
|
|
8
|
-
import { d as defineCustomElement$2 } from './p-
|
|
9
|
-
import { d as defineCustomElement$1 } from './p-
|
|
6
|
+
import { d as defineCustomElement$4 } from './p-e584d156.js';
|
|
7
|
+
import { d as defineCustomElement$3 } from './p-48fcebd3.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './p-d6ba71a4.js';
|
|
9
|
+
import { d as defineCustomElement$1 } from './p-df721dfc.js';
|
|
10
10
|
|
|
11
|
-
const styleCss = ".sc-smoothly-input-date-h{box-sizing:border-box}.sc-smoothly-input-date-h[looks=\"border\"].sc-smoothly-input-date-s>smoothly-picker-menu smoothly-input,[looks=\"border\"].sc-smoothly-input-date-h{border:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"border\"][readonly].sc-smoothly-input-date-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-input-date-h[looks=\"line\"].sc-smoothly-input-date-s>smoothly-picker-menu smoothly-input,[looks=\"line\"].sc-smoothly-input-date-h{border-bottom:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"line\"][readonly].sc-smoothly-input-date-h{border-bottom:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-input-date-h[looks=\"grid\"].sc-smoothly-input-date-s>smoothly-picker-menu smoothly-input,[looks=\"grid\"].sc-smoothly-input-date-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid .5px}[looks=\"grid\"][readonly].sc-smoothly-input-date-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .2) solid .5px}[looks=\"transparent\"].sc-smoothly-input-date-h{border:none}[looks=\"transparent\"].sc-smoothly-input-date-h:not(:focus-within){background-color:transparent}[looks=\"transparent\"].sc-smoothly-input-date-h:not(:focus-within)>input.sc-smoothly-input-date{background:transparent}[looks=\"transparent\"].sc-smoothly-input-date-h:focus-within{outline:1px solid rgb(var(--smoothly-color-contrast))}.sc-smoothly-input-date-h{position:relative;max-width:100vw;background-color:rgb(var(--background-color, var(--smoothly-color-shade)))}[looks=transparent].sc-smoothly-input-date-h smoothly-input.sc-smoothly-input-date{outline:none}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--background-color, var(--smoothly-color-shade)));min-width:18em}.sc-smoothly-input-date-h>div.sc-smoothly-input-date{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date>div.arrow.sc-smoothly-input-date{position:absolute;z-index:9;transform:translate(2em, -0.55em) rotate(45deg);width:1em;height:1em;background-color:rgb(var(--background-color, var(--smoothly-color-shade)))}@media screen and (min-width: 400px){.sc-smoothly-input-date-h>nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--background-color, var(--smoothly-color-shade)));max-width:22em}}";
|
|
11
|
+
const styleCss = ".sc-smoothly-input-date-h{box-sizing:border-box}.sc-smoothly-input-date-h[looks=\"border\"].sc-smoothly-input-date-s>smoothly-picker-menu smoothly-input,[looks=\"border\"].sc-smoothly-input-date-h{border:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"border\"][readonly].sc-smoothly-input-date-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-input-date-h[looks=\"line\"].sc-smoothly-input-date-s>smoothly-picker-menu smoothly-input,[looks=\"line\"].sc-smoothly-input-date-h{border-bottom:rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px}[looks=\"line\"][readonly].sc-smoothly-input-date-h{border-bottom:rgba(var(--text-color, var(--smoothly-color-contrast)), .1) solid 1px}.sc-smoothly-input-date-h[looks=\"grid\"].sc-smoothly-input-date-s>smoothly-picker-menu smoothly-input,[looks=\"grid\"].sc-smoothly-input-date-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid .5px}[looks=\"grid\"][readonly].sc-smoothly-input-date-h{border:rgba(var(--text-color, var(--smoothly-color-contrast)), .2) solid .5px}[looks=\"transparent\"].sc-smoothly-input-date-h{border:none}[looks=\"transparent\"].sc-smoothly-input-date-h:not(:focus-within){background-color:transparent}[looks=\"transparent\"].sc-smoothly-input-date-h:not(:focus-within)>input.sc-smoothly-input-date{background:transparent}[looks=\"transparent\"].sc-smoothly-input-date-h:focus-within{outline:1px solid rgb(var(--smoothly-color-contrast))}.sc-smoothly-input-date-h{position:relative;max-width:100vw;background-color:rgb(var(--background-color, var(--smoothly-color-shade)))}[looks=transparent].sc-smoothly-input-date-h smoothly-input.sc-smoothly-input-date{outline:none}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--background-color, var(--smoothly-color-shade)));min-width:18em}.sc-smoothly-input-date-h>div.sc-smoothly-input-date{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;z-index:2}.sc-smoothly-input-date-h>nav.sc-smoothly-input-date>div.arrow.sc-smoothly-input-date{position:absolute;z-index:9;transform:translate(2em, -0.55em) rotate(45deg);width:1em;top:1px;height:1em;background-color:rgb(var(--background-color, var(--smoothly-color-shade)))}@media screen and (min-width: 400px){.sc-smoothly-input-date-h>nav.sc-smoothly-input-date{position:absolute;z-index:10;top:3.5em;background-color:rgb(var(--background-color, var(--smoothly-color-shade)));max-width:22em}}";
|
|
12
12
|
const SmoothlyInputDateStyle0 = styleCss;
|
|
13
13
|
|
|
14
14
|
const InputDate = proxyCustomElement(class InputDate extends H {
|
|
@@ -138,4 +138,4 @@ defineCustomElement();
|
|
|
138
138
|
|
|
139
139
|
export { InputDate as I, defineCustomElement as d };
|
|
140
140
|
|
|
141
|
-
//# sourceMappingURL=p-
|
|
141
|
+
//# sourceMappingURL=p-c8cfe6cd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-c8cfe6cd.js","mappings":";;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,6+EAA6+E,CAAC;AAC//E,gCAAe,QAAQ;;MCsBV,SAAS;;;;;;;;;qBAGkC,OAAO;;;;;;yBAMzB,IAAI;;;IAOzC,iBAAiB;QAChB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,OAAM,CAAC,CAAA;QACpC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;KAC3G;IAGD,MAAM,KAAK;QACV,IAAI,CAAC,KAAK,GAAG,SAAS,CAAA;KACtB;IAED,OAAO,CAAC,IAAU;QACjB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACnC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC,CAAA;KAC9C;IAED,oBAAoB,CAAC,KAAuC;QAC3D,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO;YAC/B,KAAK,CAAC,eAAe,EAAE,CAAA;KACxB;IAED,yBAAyB,CAAC,KAA0C;QACnE,IAAI,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO;YAC/B,KAAK,CAAC,eAAe,EAAE,CAAA;KACxB;IAED,cAAc,CAAC,KAAwB;QACtC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAA;QACjB,KAAK,CAAC,eAAe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KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/input/date/style.css?tag=smoothly-input-date&encapsulation=scoped","src/components/input/date/index.tsx"],"sourcesContent":["@import \"../shared.css\";\n\n:host {\n\tposition: relative;\n\tmax-width: 100vw;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n}\n:host[looks=transparent] smoothly-input {\n\toutline: none;\n}\n:host > nav {\n\tposition: absolute;\n\tz-index: 10;\n\ttop: 3.5em;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n\tmin-width: 18em;\n}\n:host > div {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\twidth: 100vw;\n\theight: 100vh;\n\tz-index: 2;\n}\n:host > nav > div.arrow {\n\tposition: absolute;\n\tz-index: 9;\n\ttransform: translate(2em, -0.55em) rotate(45deg);\n\twidth: 1em;\n\ttop: 1px;\n\theight: 1em;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n}\n\n@media screen and (min-width: 400px){\n\t:host > nav {\n\t\tposition: absolute;\n\t\tz-index: 10;\n\t\ttop: 3.5em;\n\t\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n\t\tmax-width: 22em;\n\t\t\n\t}\n}\n","import {\n\tComponent,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tMethod,\n\tProp,\n\tWatch,\n} from \"@stencil/core\"\nimport { Date } from \"isoly\"\nimport { Color } from \"../../../model\"\nimport { Clearable } from \"../Clearable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n\n@Component({\n\ttag: \"smoothly-input-date\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class InputDate implements ComponentWillLoad, Clearable, Input {\n\t@Element() element: HTMLElement\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks: Looks = \"plain\"\n\t@Prop({ reflect: true }) name: string\n\t@Prop({ mutable: true }) value?: Date\n\t@Prop({ mutable: true }) open: boolean\n\t@Prop({ mutable: true }) max: Date\n\t@Prop({ mutable: true }) min: Date\n\t@Prop({ reflect: true }) showLabel = true\n\t@Prop({ mutable: true }) disabled: boolean\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\t@Event() smoothlyValueChange: EventEmitter<Date>\n\t@Event() smoothlyInput: EventEmitter<Record<string, any>>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\n\tcomponentWillLoad(): void {\n\t\tthis.smoothlyInputLoad.emit(_ => {})\n\t\tthis.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)))\n\t}\n\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tthis.value = undefined\n\t}\n\t@Watch(\"value\")\n\tonStart(next: Date) {\n\t\tthis.smoothlyValueChange.emit(next)\n\t\tthis.smoothlyInput.emit({ [this.name]: next })\n\t}\n\t@Listen(\"smoothlyInput\")\n\tsmoothlyInputHandler(event: CustomEvent<Record<string, any>>) {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks) => void>) {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\t@Listen(\"smoothlyDateSet\")\n\tdateSetHandler(event: CustomEvent<Date>) {\n\t\tthis.open = false\n\t\tevent.stopPropagation()\n\t}\n\trender() {\n\t\treturn [\n\t\t\t<smoothly-input\n\t\t\t\tcolor={this.color}\n\t\t\t\tname={this.name}\n\t\t\t\tonFocus={() => (this.open = !this.open)}\n\t\t\t\tonClick={() => (this.open = !this.open)}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\ttype=\"date\"\n\t\t\t\tvalue={this.value}\n\t\t\t\tlooks={this.looks}\n\t\t\t\tshowLabel={this.showLabel}\n\t\t\t\tonSmoothlyInput={e => (this.value = e.detail[this.name])}>\n\t\t\t\t<slot></slot>\n\t\t\t</smoothly-input>,\n\t\t\tthis.open && !this.disabled\n\t\t\t\t? [\n\t\t\t\t\t\t<div onClick={() => (this.open = false)}></div>,\n\t\t\t\t\t\t<nav>\n\t\t\t\t\t\t\t<div class=\"arrow\"></div>\n\t\t\t\t\t\t\t<smoothly-calendar\n\t\t\t\t\t\t\t\tdoubleInput={false}\n\t\t\t\t\t\t\t\tvalue={this.value ?? Date.now()}\n\t\t\t\t\t\t\t\tonSmoothlyValueChange={event => {\n\t\t\t\t\t\t\t\t\tthis.value = event.detail\n\t\t\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\t\t\tmin={this.min}>\n\t\t\t\t\t\t\t\t<div slot={\"year-label\"}>\n\t\t\t\t\t\t\t\t\t<slot name={\"year-label\"} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div slot={\"month-label\"}>\n\t\t\t\t\t\t\t\t\t<slot name={\"month-label\"} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</smoothly-calendar>\n\t\t\t\t\t\t</nav>,\n\t\t\t\t ]\n\t\t\t\t: [],\n\t\t]\n\t}\n}\n"],"version":3}
|
|
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-
|
|
|
2
2
|
import { a as any } from './p-4c320ba4.js';
|
|
3
3
|
import { o as object, b as boolean, i as islyFunction } from './p-20c5f1b5.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './p-b1fbd693.js';
|
|
5
|
-
import { d as defineCustomElement$1 } from './p-
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-df721dfc.js';
|
|
6
6
|
|
|
7
7
|
var Item;
|
|
8
8
|
(function (Item) {
|
|
@@ -334,4 +334,4 @@ defineCustomElement();
|
|
|
334
334
|
|
|
335
335
|
export { SmoothlyInputSelect as S, defineCustomElement as d };
|
|
336
336
|
|
|
337
|
-
//# sourceMappingURL=p-
|
|
337
|
+
//# sourceMappingURL=p-d6ba71a4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-229cf51b.js","mappings":";;;;;;IAIiB,IAAI,CAkBpB;AAlBD,WAAiB,IAAI;IAOpB,IAAiB,OAAO,CAQvB;IARD,WAAiB,OAAO;QACV,YAAI,GAAGA,MAAW,CAAU;YACxC,KAAK,EAAEC,GAAQ,EAAE;YACjB,YAAY,EAAEC,OAAY,EAAE;YAC5B,QAAQ,EAAEA,OAAY,EAAE,CAAC,QAAQ,EAAE;YACnC,MAAM,EAAEC,YAAa,EAAE;SACvB,CAAC,CAAA;QACW,UAAE,GAAG,QAAA,IAAI,CAAC,EAAE,CAAA;KACzB,EARgB,OAAO,GAAP,YAAO,KAAP,YAAO,QAQvB;IACY,SAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAO,EAAE,CAAC,CAAA;IACpC,OAAE,GAAG,KAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAlBgB,IAAI,KAAJ,IAAI;;ACJrB,MAAM,QAAQ,GAAG,2tIAA2tI,CAAC;AAC7uI,kCAAe,QAAQ;;MCyBV,mBAAmB;;;;;;;;;QACvB,iBAAY,GAA8B,EAAE,CAAA;QAC5C,wBAAmB,GAAG,KAAK,CAAA;QAC3B,aAAQ,GAAsD,EAAE,CAAA;QAIhE,UAAK,GAA8B,EAAE,CAAA;oBAG9B,UAAU;;qBAE8B,OAAO;4BACG,IAAI;wBAClB,KAAK;wBACrC,KAAK;yBACJ,IAAI;uBACW,KAAK;;;wBAGrB,KAAK;8BACC,KAAK;oBACd,KAAK;wBAC0B,EAAE;sBAC/B,EAAE;;IAOpB,iBAAiB;;QAChB,IAAI,CAAC,kBAAkB,CAAC,IAA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;gBAChB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;aACpB,GACA,CACa,CAChB,EACD,8DAAQ,CACH,CACA,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isly.object","isly.any","isly.boolean","isly.function"],"sources":["src/components/item/Item.ts","src/components/input/select/style.css?tag=smoothly-input-select&encapsulation=scoped","src/components/input/select/index.tsx"],"sourcesContent":["import { isly } from \"isly\"\n\nexport interface Item extends Item.Element {}\n\nexport namespace Item {\n\texport interface Element {\n\t\tvalue: any\n\t\tselected?: boolean\n\t\tdeselectable: boolean\n\t\tfilter: (filter: string) => Promise<void>\n\t}\n\texport namespace Element {\n\t\texport const type = isly.object<Element>({\n\t\t\tvalue: isly.any(),\n\t\t\tdeselectable: isly.boolean(),\n\t\t\tselected: isly.boolean().optional(),\n\t\t\tfilter: isly.function(),\n\t\t})\n\t\texport const is = type.is\n\t}\n\texport const type = Element.type.extend<Item>({})\n\texport const is = type.is\n}\n","@import \"../shared.css\";\n\n:host {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-direction: row;\n\tposition: relative;\n\tbackground-color: rgb(var(--smoothly-color-shade));\n}\n\n:host.icon {\n\twidth: fit-content;\n\tflex-direction: column;\n}\n\n:host>div.select-display {\n\tbox-sizing: border-box;\n\tmin-height: 2.7em;\n\tdisplay: flex;\n\tcursor: default;\n\tpadding: .7em;\n\toverflow: hidden;\n\twidth: 100%;\n\twhite-space: nowrap;\n\tgap: 1em;\n\ttext-overflow: ellipsis;\n}\n\n:host>div.icons {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tmargin-right: .4em;\n}\n\n:host>div.icons::slotted(smoothly-input-reset) {\n\tpadding-right: .2em;\n}\n\n:host::slotted([slot=label]) {\n\tposition: absolute;\n\tleft: 0.4em;\n\ttop: 0.6em;\n\topacity: 0.8;\n\ttransform-origin: top left;\n\ttransition: transform 100ms ease;\n}\n\n:host.has-value::slotted([slot=label]),\n:host:not(.has-value)[placeholder]::slotted([slot=label]) {\n\ttop: 0.4em;\n\ttransform: scale(0.6);\n}\n\n:host.has-value:has([slot=label])>div.select-display,\n:host:not(.has-value)[placeholder]>div.select-display {\n\tpadding-bottom: .1em;\n\tpadding-left: .8em;\n\tpadding-top: 1.1em;\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n:host>.options {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: absolute;\n\ttop: var(--element-height);\n\tz-index: 10;\n\tmax-height: var(--menu-height, unset);\n\twidth: 100%;\n\toverflow-y: auto;\n\tbackground-color: rgb(var(--smoothly-default-shade));\n}\n\n:host[looks=border]>div.options {\n\ttransform: translateX(-1px);\n\tborder: rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px;\n\tborder-top: rgba(var(--text-color, var(--smoothly-color-contrast)), .4) solid 1px;\n}\n\n:host[looks=\"grid\"]>div.options {\n\ttransform: translateX(-2px);\n\tborder: rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid 2px;\n\tborder-top: rgba(var(--text-color, var(--smoothly-color-contrast)), .2) solid 2px;\n}\n\n:host>div.options::slotted(smoothly-item) {\n\tpadding: .7em;\n}\n\n:host>div.options::slotted(smoothly-item:not([selectable])) {\n\tdisplay: flex;\n\tgap: 1em;\n\tbackground-color: rgba(var(--smoothly-primary-tint), .5);\n\tcolor: var(--smoothly-color-contrast)\n}\n\n:host>div.options>smoothly-item:not([selectable])>smoothly-icon[name=\"backspace-outline\"] {\n\tmargin-left: auto;\n\tmargin-right: 0;\n}\n\n:host>div.options.hidden {\n\tdisplay: none;\n}\n","import {\n\tComponent,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tMethod,\n\tProp,\n\tState,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { Color, Data } from \"../../../model\"\nimport { Item } from \"../../item/Item\"\nimport { Clearable } from \"../Clearable\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n@Component({\n\ttag: \"smoothly-input-select\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputSelect implements Input, Editable, Clearable, ComponentWillLoad {\n\tprivate initialValue: HTMLSmoothlyItemElement[] = []\n\tprivate initialValueHandled = false\n\tprivate listener: { changed?: (parent: Editable) => Promise<void> } = {}\n\tprivate displaySelectedElement?: HTMLElement\n\tprivate iconsDiv?: HTMLElement\n\tprivate toggle?: HTMLElement\n\tprivate items: HTMLSmoothlyItemElement[] = []\n\tprivate itemHeight: number | undefined\n\t@Element() element: HTMLSmoothlyInputSelectElement\n\t@Prop() name = \"selected\"\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks: Looks = \"plain\"\n\t@Prop({ reflect: true, mutable: true }) showSelected?: boolean = true\n\t@Prop({ reflect: true, mutable: true }) readonly = false\n\t@Prop() multiple = false\n\t@Prop() clearable = true\n\t@Prop({ mutable: true }) changed = false\n\t@Prop({ reflect: true }) placeholder?: string | any\n\t@Prop() menuHeight?: `${number}${\"items\" | \"rem\" | \"px\" | \"vh\"}`\n\t@Prop() required = false\n\t@Prop() searchDisabled = false\n\t@State() open = false\n\t@State() selected: HTMLSmoothlyItemElement[] = []\n\t@State() filter = \"\"\n\t@Event() smoothlyInput: EventEmitter<Data>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\t@Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void>\n\t@Event() smoothlyItemSelect: EventEmitter<HTMLSmoothlyItemElement>\n\n\tcomponentWillLoad(): void | Promise<void> {\n\t\tthis.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)))\n\t\tthis.smoothlyInputLoad.emit(() => {\n\t\t\treturn\n\t\t})\n\t\t!this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly))\n\t\tthis.listener.changed?.(this)\n\t}\n\tcomponentDidLoad(): void | Promise<void> {\n\t\tthis.selected && !this.initialValueHandled && (this.initialValue = [...this.selected])\n\t\tthis.initialValueHandled = true\n\t\tthis.onSelectedChange()\n\t}\n\tcomponentDidRender(): void | Promise<void> {\n\t\tthis.itemHeight === undefined && (this.itemHeight = this.items.find(item => item.clientHeight > 0)?.clientHeight)\n\t\tif (this.menuHeight && this.itemHeight) {\n\t\t\tthis.element?.style.setProperty(\n\t\t\t\t\"--menu-height\",\n\t\t\t\t!this.menuHeight.endsWith(\"items\") || this.items.length == 0\n\t\t\t\t\t? this.menuHeight\n\t\t\t\t\t: `${this.itemHeight * +(this.menuHeight.match(/^(\\d+(\\.\\d+)?|\\.\\d+)/g)?.[0] ?? \"10\")}px`\n\t\t\t)\n\t\t}\n\t\tthis.element?.style.setProperty(\"--element-height\", `${this.element.clientHeight}px`)\n\t}\n\t@Method()\n\tasync listen(property: \"changed\", listener: (parent: Editable) => Promise<void>): Promise<void> {\n\t\tthis.listener[property] = listener\n\t\tlistener(this)\n\t}\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.selected.forEach(item => (item.selected = item.hidden = false))\n\t\tthis.initialValue.forEach(item => (item.selected = true))\n\t\tthis.selected = [...this.initialValue]\n\t\tthis.displaySelected()\n\t\tthis.changed = false\n\t\tthis.open && this.handleShowOptions()\n\t}\n\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tif (this.clearable) {\n\t\t\tthis.selected.forEach(item => (item.selected = item.hidden = false))\n\t\t\tthis.selected = []\n\t\t\tif (this.displaySelectedElement) {\n\t\t\t\tthis.displaySelectedElement.innerHTML = this.placeholder ?? \"\"\n\t\t\t}\n\t\t}\n\t}\n\t@Method()\n\tasync edit(editable: boolean): Promise<void> {\n\t\tthis.readonly = !editable\n\t}\n\t@Method()\n\tasync setInitialValue(): Promise<void> {\n\t\tthis.changed = false\n\t\tthis.initialValue = [...this.selected]\n\t}\n\t@Watch(\"selected\")\n\tonSelectedChange() {\n\t\tthis.initialValueHandled && (this.changed = !this.areValuesEqual(this.selected, this.initialValue))\n\t\tconst value =\n\t\t\t!this.multiple && this.selected[0]\n\t\t\t\t? this.selected[0].value\n\t\t\t\t: this.multiple && this.selected.length > 0\n\t\t\t\t? this.selected.map(item => item.value)\n\t\t\t\t: undefined\n\t\tthis.smoothlyInput.emit({ [this.name]: value })\n\t\tthis.listener.changed?.(this)\n\t}\n\t@Watch(\"required\")\n\tonRequiredChange(): void {\n\t\tthis.items.forEach(item => (item.deselectable = !this.required))\n\t}\n\t@Watch(\"filter\")\n\tasync onFilterChange(value: string): Promise<void> {\n\t\tvalue = value.toLowerCase()\n\t\tawait Promise.all(this.items.map(item => item.filter(value)))\n\t}\n\t@Watch(\"readonly\")\n\twatchingReadonly(): void {\n\t\tthis.listener.changed?.(this)\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tasync smoothlyInputLoadHandler(event: CustomEvent<(parent: SmoothlyInputSelect) => void>): Promise<void> {\n\t\tif (\n\t\t\tevent.target &&\n\t\t\t((\"name\" in event.target && event.target.name !== this.name) ||\n\t\t\t\t(event.composedPath().some(e => e == this.iconsDiv) && !event.composedPath().some(e => e == this.toggle)))\n\t\t) {\n\t\t\tevent.stopPropagation()\n\t\t} else if (Item.Element.is(event.target)) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.target.deselectable = !this.required\n\t\t\tthis.items.push(event.target as HTMLSmoothlyItemElement)\n\t\t}\n\t\tevent.detail(this)\n\t}\n\t@Listen(\"click\", { target: \"window\" })\n\tonWindowClick(event: Event): void {\n\t\t!event.composedPath().includes(this.element) && this.open && this.handleShowOptions()\n\t}\n\t@Listen(\"smoothlyItemSelect\")\n\tonItemSelect(event: CustomEvent<HTMLSmoothlyItemElement>): void {\n\t\tevent.stopPropagation()\n\t\tif (this.multiple) {\n\t\t\tthis.selected = event.detail.selected\n\t\t\t\t? [...this.selected, event.detail]\n\t\t\t\t: this.selected.filter(item => item.selected)\n\t\t} else {\n\t\t\tthis.selected[0] && (this.selected[0].hidden = this.selected[0].selected = false)\n\t\t\tthis.selected = !event.detail.selected ? [] : [event.detail]\n\t\t\t!this.showSelected && event.detail.selected && (event.detail.hidden = true)\n\t\t}\n\t\tthis.displaySelected()\n\t\tthis.element.focus()\n\t}\n\t@Watch(\"open\")\n\tonClosed(): void {\n\t\tif (!this.open) {\n\t\t\tconst marked = this.items.find(item => item.marked)\n\t\t\tif (marked)\n\t\t\t\tmarked.marked = false\n\t\t}\n\t}\n\thandleShowOptions(event?: Event): void {\n\t\tevent && event.stopPropagation()\n\t\tconst wasButtonClicked =\n\t\t\tevent?.composedPath().some(e => e == this.iconsDiv) && !event.composedPath().some(e => e == this.toggle)\n\n\t\t!this.readonly &&\n\t\t\t!(event?.target && this.items.includes(event.target as HTMLSmoothlyItemElement) && this.multiple) &&\n\t\t\t!wasButtonClicked &&\n\t\t\t(this.open = !this.open)\n\t\tthis.filter = \"\"\n\t}\n\tareValuesEqual(selected: HTMLSmoothlyItemElement[], initialValue: HTMLSmoothlyItemElement[]): boolean {\n\t\treturn selected.length === initialValue.length && initialValue.every(value => selected.includes(value))\n\t}\n\tdisplaySelected(): void {\n\t\tconst displayString: string = \"<div>\" + this.selected.map(option => option.innerHTML).join(\"</div><div>\") + \"</div>\"\n\t\tthis.displaySelectedElement &&\n\t\t\t(this.displaySelectedElement.innerHTML =\n\t\t\t\tthis.selected.length > 0 ? displayString : this.placeholder ? this.placeholder : \"\")\n\t}\n\t@Listen(\"keydown\")\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif (!this.searchDisabled) {\n\t\t\tevent.stopPropagation()\n\t\t\tconst visibleItems = this.items.some(item => item.getAttribute(\"hidden\") === null)\n\t\t\tif (event.key != \"Tab\" && !event.ctrlKey && !event.metaKey)\n\t\t\t\tevent.preventDefault()\n\t\t\tif (this.open) {\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\tvisibleItems && this.move(-1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\tvisibleItems && this.move(1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Escape\":\n\t\t\t\t\t\tif (this.filter == \"\")\n\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Backspace\":\n\t\t\t\t\t\tthis.filter = this.filter.slice(0, -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\t\tconst result = this.items.find(item => item.marked)\n\t\t\t\t\t\tif (result?.value)\n\t\t\t\t\t\t\tresult.selected = !result.selected\n\t\t\t\t\t\tthis.smoothlyItemSelect.emit(result)\n\t\t\t\t\t\tif (!this.multiple) {\n\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\tcase \" \":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tthis.move(0)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tthis.move(-1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tprivate move(direction: -1 | 0 | 1): void {\n\t\tlet markedIndex = this.items.findIndex(item => item.marked)\n\t\tif (markedIndex == -1)\n\t\t\tmarkedIndex = this.items.findIndex(item => item.selected)\n\t\tif (this.items[markedIndex])\n\t\t\tthis.items[markedIndex].marked = false\n\t\tif (markedIndex == -1)\n\t\t\tmarkedIndex = 0\n\t\tdo {\n\t\t\tmarkedIndex = (markedIndex + direction + this.items.length) % this.items.length\n\t\t} while (this.items[markedIndex].hidden)\n\t\tthis.items[markedIndex].marked = true\n\t}\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\ttabIndex={0}\n\t\t\t\tclass={{ \"has-value\": this.selected.length !== 0 }}\n\t\t\t\tonClick={(event: Event) => this.handleShowOptions(event)}>\n\t\t\t\t<div class=\"select-display\" ref={element => (this.displaySelectedElement = element)}>\n\t\t\t\t\t{this.placeholder}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"icons\" ref={element => (this.iconsDiv = element)}>\n\t\t\t\t\t<slot name=\"end\" />\n\t\t\t\t\t{this.looks == \"border\" && (\n\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\tref={element => (this.toggle = element)}\n\t\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\t\tname={this.open ? \"caret-down-outline\" : \"caret-forward-outline\"}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<slot name=\"label\" />\n\t\t\t\t<div class={`${this.open ? \"\" : \"hidden\"} options`}>\n\t\t\t\t\t{this.filter.length > 0 && (\n\t\t\t\t\t\t<smoothly-item selectable={false}>\n\t\t\t\t\t\t\t<smoothly-icon name=\"search-outline\" size=\"small\" />\n\t\t\t\t\t\t\t{this.filter}\n\t\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\t\tname=\"backspace-outline\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\t\t\t\tthis.element.focus()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t)}\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-d6ba71a4.js","mappings":";;;;;;IAIiB,IAAI,CAkBpB;AAlBD,WAAiB,IAAI;IAOpB,IAAiB,OAAO,CAQvB;IARD,WAAiB,OAAO;QACV,YAAI,GAAGA,MAAW,CAAU;YACxC,KAAK,EAAEC,GAAQ,EAAE;YACjB,YAAY,EAAEC,OAAY,EAAE;YAC5B,QAAQ,EAAEA,OAAY,EAAE,CAAC,QAAQ,EAAE;YACnC,MAAM,EAAEC,YAAa,EAAE;SACvB,CAAC,CAAA;QACW,UAAE,GAAG,QAAA,IAAI,CAAC,EAAE,CAAA;KACzB,EARgB,OAAO,GAAP,YAAO,KAAP,YAAO,QAQvB;IACY,SAAI,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAO,EAAE,CAAC,CAAA;IACpC,OAAE,GAAG,KAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAlBgB,IAAI,KAAJ,IAAI;;ACJrB,MAAM,QAAQ,GAAG,2tIAA2tI,CAAC;AAC7uI,kCAAe,QAAQ;;MCyBV,mBAAmB;;;;;;;;;QACvB,iBAAY,GAA8B,EAAE,CAAA;QAC5C,wBAAmB,GAAG,KAAK,CAAA;QAC3B,aAAQ,GAAsD,EAAE,C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,KAAK,IAC/B,sEAAe,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAC,OAAO,GAAG,EACnD,IAAI,CAAC,MAAM,EACZ,sEACC,IAAI,EAAC,mBAAmB,EACxB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,CAAC;gBACT,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAA;gBAChB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;aACpB,GACA,CACa,CAChB,EACD,8DAAQ,CACH,CACA,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isly.object","isly.any","isly.boolean","isly.function"],"sources":["src/components/item/Item.ts","src/components/input/select/style.css?tag=smoothly-input-select&encapsulation=scoped","src/components/input/select/index.tsx"],"sourcesContent":["import { isly } from \"isly\"\n\nexport interface Item extends Item.Element {}\n\nexport namespace Item {\n\texport interface Element {\n\t\tvalue: any\n\t\tselected?: boolean\n\t\tdeselectable: boolean\n\t\tfilter: (filter: string) => Promise<void>\n\t}\n\texport namespace Element {\n\t\texport const type = isly.object<Element>({\n\t\t\tvalue: isly.any(),\n\t\t\tdeselectable: isly.boolean(),\n\t\t\tselected: isly.boolean().optional(),\n\t\t\tfilter: isly.function(),\n\t\t})\n\t\texport const is = type.is\n\t}\n\texport const type = Element.type.extend<Item>({})\n\texport const is = type.is\n}\n","@import \"../shared.css\";\n\n:host {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-direction: row;\n\tposition: relative;\n\tbackground-color: rgb(var(--smoothly-color-shade));\n}\n\n:host.icon {\n\twidth: fit-content;\n\tflex-direction: column;\n}\n\n:host>div.select-display {\n\tbox-sizing: border-box;\n\tmin-height: 2.7em;\n\tdisplay: flex;\n\tcursor: default;\n\tpadding: .7em;\n\toverflow: hidden;\n\twidth: 100%;\n\twhite-space: nowrap;\n\tgap: 1em;\n\ttext-overflow: ellipsis;\n}\n\n:host>div.icons {\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tmargin-right: .4em;\n}\n\n:host>div.icons::slotted(smoothly-input-reset) {\n\tpadding-right: .2em;\n}\n\n:host::slotted([slot=label]) {\n\tposition: absolute;\n\tleft: 0.4em;\n\ttop: 0.6em;\n\topacity: 0.8;\n\ttransform-origin: top left;\n\ttransition: transform 100ms ease;\n}\n\n:host.has-value::slotted([slot=label]),\n:host:not(.has-value)[placeholder]::slotted([slot=label]) {\n\ttop: 0.4em;\n\ttransform: scale(0.6);\n}\n\n:host.has-value:has([slot=label])>div.select-display,\n:host:not(.has-value)[placeholder]>div.select-display {\n\tpadding-bottom: .1em;\n\tpadding-left: .8em;\n\tpadding-top: 1.1em;\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n:host>.options {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: absolute;\n\ttop: var(--element-height);\n\tz-index: 10;\n\tmax-height: var(--menu-height, unset);\n\twidth: 100%;\n\toverflow-y: auto;\n\tbackground-color: rgb(var(--smoothly-default-shade));\n}\n\n:host[looks=border]>div.options {\n\ttransform: translateX(-1px);\n\tborder: rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px;\n\tborder-top: rgba(var(--text-color, var(--smoothly-color-contrast)), .4) solid 1px;\n}\n\n:host[looks=\"grid\"]>div.options {\n\ttransform: translateX(-2px);\n\tborder: rgba(var(--text-color, var(--smoothly-color-contrast)), .5) solid 2px;\n\tborder-top: rgba(var(--text-color, var(--smoothly-color-contrast)), .2) solid 2px;\n}\n\n:host>div.options::slotted(smoothly-item) {\n\tpadding: .7em;\n}\n\n:host>div.options::slotted(smoothly-item:not([selectable])) {\n\tdisplay: flex;\n\tgap: 1em;\n\tbackground-color: rgba(var(--smoothly-primary-tint), .5);\n\tcolor: var(--smoothly-color-contrast)\n}\n\n:host>div.options>smoothly-item:not([selectable])>smoothly-icon[name=\"backspace-outline\"] {\n\tmargin-left: auto;\n\tmargin-right: 0;\n}\n\n:host>div.options.hidden {\n\tdisplay: none;\n}\n","import {\n\tComponent,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tMethod,\n\tProp,\n\tState,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { Color, Data } from \"../../../model\"\nimport { Item } from \"../../item/Item\"\nimport { Clearable } from \"../Clearable\"\nimport { Editable } from \"../Editable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n@Component({\n\ttag: \"smoothly-input-select\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInputSelect implements Input, Editable, Clearable, ComponentWillLoad {\n\tprivate initialValue: HTMLSmoothlyItemElement[] = []\n\tprivate initialValueHandled = false\n\tprivate listener: { changed?: (parent: Editable) => Promise<void> } = {}\n\tprivate displaySelectedElement?: HTMLElement\n\tprivate iconsDiv?: HTMLElement\n\tprivate toggle?: HTMLElement\n\tprivate items: HTMLSmoothlyItemElement[] = []\n\tprivate itemHeight: number | undefined\n\t@Element() element: HTMLSmoothlyInputSelectElement\n\t@Prop() name = \"selected\"\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks: Looks = \"plain\"\n\t@Prop({ reflect: true, mutable: true }) showSelected?: boolean = true\n\t@Prop({ reflect: true, mutable: true }) readonly = false\n\t@Prop() multiple = false\n\t@Prop() clearable = true\n\t@Prop({ mutable: true }) changed = false\n\t@Prop({ reflect: true }) placeholder?: string | any\n\t@Prop() menuHeight?: `${number}${\"items\" | \"rem\" | \"px\" | \"vh\"}`\n\t@Prop() required = false\n\t@Prop() searchDisabled = false\n\t@State() open = false\n\t@State() selected: HTMLSmoothlyItemElement[] = []\n\t@State() filter = \"\"\n\t@Event() smoothlyInput: EventEmitter<Data>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\t@Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void>\n\t@Event() smoothlyItemSelect: EventEmitter<HTMLSmoothlyItemElement>\n\n\tcomponentWillLoad(): void | Promise<void> {\n\t\tthis.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)))\n\t\tthis.smoothlyInputLoad.emit(() => {\n\t\t\treturn\n\t\t})\n\t\t!this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly))\n\t\tthis.listener.changed?.(this)\n\t}\n\tcomponentDidLoad(): void | Promise<void> {\n\t\tthis.selected && !this.initialValueHandled && (this.initialValue = [...this.selected])\n\t\tthis.initialValueHandled = true\n\t\tthis.onSelectedChange()\n\t}\n\tcomponentDidRender(): void | Promise<void> {\n\t\tthis.itemHeight === undefined && (this.itemHeight = this.items.find(item => item.clientHeight > 0)?.clientHeight)\n\t\tif (this.menuHeight && this.itemHeight) {\n\t\t\tthis.element?.style.setProperty(\n\t\t\t\t\"--menu-height\",\n\t\t\t\t!this.menuHeight.endsWith(\"items\") || this.items.length == 0\n\t\t\t\t\t? this.menuHeight\n\t\t\t\t\t: `${this.itemHeight * +(this.menuHeight.match(/^(\\d+(\\.\\d+)?|\\.\\d+)/g)?.[0] ?? \"10\")}px`\n\t\t\t)\n\t\t}\n\t\tthis.element?.style.setProperty(\"--element-height\", `${this.element.clientHeight}px`)\n\t}\n\t@Method()\n\tasync listen(property: \"changed\", listener: (parent: Editable) => Promise<void>): Promise<void> {\n\t\tthis.listener[property] = listener\n\t\tlistener(this)\n\t}\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\tthis.selected.forEach(item => (item.selected = item.hidden = false))\n\t\tthis.initialValue.forEach(item => (item.selected = true))\n\t\tthis.selected = [...this.initialValue]\n\t\tthis.displaySelected()\n\t\tthis.changed = false\n\t\tthis.open && this.handleShowOptions()\n\t}\n\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tif (this.clearable) {\n\t\t\tthis.selected.forEach(item => (item.selected = item.hidden = false))\n\t\t\tthis.selected = []\n\t\t\tif (this.displaySelectedElement) {\n\t\t\t\tthis.displaySelectedElement.innerHTML = this.placeholder ?? \"\"\n\t\t\t}\n\t\t}\n\t}\n\t@Method()\n\tasync edit(editable: boolean): Promise<void> {\n\t\tthis.readonly = !editable\n\t}\n\t@Method()\n\tasync setInitialValue(): Promise<void> {\n\t\tthis.changed = false\n\t\tthis.initialValue = [...this.selected]\n\t}\n\t@Watch(\"selected\")\n\tonSelectedChange() {\n\t\tthis.initialValueHandled && (this.changed = !this.areValuesEqual(this.selected, this.initialValue))\n\t\tconst value =\n\t\t\t!this.multiple && this.selected[0]\n\t\t\t\t? this.selected[0].value\n\t\t\t\t: this.multiple && this.selected.length > 0\n\t\t\t\t? this.selected.map(item => item.value)\n\t\t\t\t: undefined\n\t\tthis.smoothlyInput.emit({ [this.name]: value })\n\t\tthis.listener.changed?.(this)\n\t}\n\t@Watch(\"required\")\n\tonRequiredChange(): void {\n\t\tthis.items.forEach(item => (item.deselectable = !this.required))\n\t}\n\t@Watch(\"filter\")\n\tasync onFilterChange(value: string): Promise<void> {\n\t\tvalue = value.toLowerCase()\n\t\tawait Promise.all(this.items.map(item => item.filter(value)))\n\t}\n\t@Watch(\"readonly\")\n\twatchingReadonly(): void {\n\t\tthis.listener.changed?.(this)\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tasync smoothlyInputLoadHandler(event: CustomEvent<(parent: SmoothlyInputSelect) => void>): Promise<void> {\n\t\tif (\n\t\t\tevent.target &&\n\t\t\t((\"name\" in event.target && event.target.name !== this.name) ||\n\t\t\t\t(event.composedPath().some(e => e == this.iconsDiv) && !event.composedPath().some(e => e == this.toggle)))\n\t\t) {\n\t\t\tevent.stopPropagation()\n\t\t} else if (Item.Element.is(event.target)) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.target.deselectable = !this.required\n\t\t\tthis.items.push(event.target as HTMLSmoothlyItemElement)\n\t\t}\n\t\tevent.detail(this)\n\t}\n\t@Listen(\"click\", { target: \"window\" })\n\tonWindowClick(event: Event): void {\n\t\t!event.composedPath().includes(this.element) && this.open && this.handleShowOptions()\n\t}\n\t@Listen(\"smoothlyItemSelect\")\n\tonItemSelect(event: CustomEvent<HTMLSmoothlyItemElement>): void {\n\t\tevent.stopPropagation()\n\t\tif (this.multiple) {\n\t\t\tthis.selected = event.detail.selected\n\t\t\t\t? [...this.selected, event.detail]\n\t\t\t\t: this.selected.filter(item => item.selected)\n\t\t} else {\n\t\t\tthis.selected[0] && (this.selected[0].hidden = this.selected[0].selected = false)\n\t\t\tthis.selected = !event.detail.selected ? [] : [event.detail]\n\t\t\t!this.showSelected && event.detail.selected && (event.detail.hidden = true)\n\t\t}\n\t\tthis.displaySelected()\n\t\tthis.element.focus()\n\t}\n\t@Watch(\"open\")\n\tonClosed(): void {\n\t\tif (!this.open) {\n\t\t\tconst marked = this.items.find(item => item.marked)\n\t\t\tif (marked)\n\t\t\t\tmarked.marked = false\n\t\t}\n\t}\n\thandleShowOptions(event?: Event): void {\n\t\tevent && event.stopPropagation()\n\t\tconst wasButtonClicked =\n\t\t\tevent?.composedPath().some(e => e == this.iconsDiv) && !event.composedPath().some(e => e == this.toggle)\n\n\t\t!this.readonly &&\n\t\t\t!(event?.target && this.items.includes(event.target as HTMLSmoothlyItemElement) && this.multiple) &&\n\t\t\t!wasButtonClicked &&\n\t\t\t(this.open = !this.open)\n\t\tthis.filter = \"\"\n\t}\n\tareValuesEqual(selected: HTMLSmoothlyItemElement[], initialValue: HTMLSmoothlyItemElement[]): boolean {\n\t\treturn selected.length === initialValue.length && initialValue.every(value => selected.includes(value))\n\t}\n\tdisplaySelected(): void {\n\t\tconst displayString: string = \"<div>\" + this.selected.map(option => option.innerHTML).join(\"</div><div>\") + \"</div>\"\n\t\tthis.displaySelectedElement &&\n\t\t\t(this.displaySelectedElement.innerHTML =\n\t\t\t\tthis.selected.length > 0 ? displayString : this.placeholder ? this.placeholder : \"\")\n\t}\n\t@Listen(\"keydown\")\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif (!this.searchDisabled) {\n\t\t\tevent.stopPropagation()\n\t\t\tconst visibleItems = this.items.some(item => item.getAttribute(\"hidden\") === null)\n\t\t\tif (event.key != \"Tab\" && !event.ctrlKey && !event.metaKey)\n\t\t\t\tevent.preventDefault()\n\t\t\tif (this.open) {\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\tvisibleItems && this.move(-1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\tvisibleItems && this.move(1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Escape\":\n\t\t\t\t\t\tif (this.filter == \"\")\n\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Backspace\":\n\t\t\t\t\t\tthis.filter = this.filter.slice(0, -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\t\tconst result = this.items.find(item => item.marked)\n\t\t\t\t\t\tif (result?.value)\n\t\t\t\t\t\t\tresult.selected = !result.selected\n\t\t\t\t\t\tthis.smoothlyItemSelect.emit(result)\n\t\t\t\t\t\tif (!this.multiple) {\n\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (event.key) {\n\t\t\t\t\tcase \"Enter\":\n\t\t\t\t\tcase \" \":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowDown\":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tthis.move(0)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"ArrowUp\":\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tthis.move(-1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tcase \"Tab\":\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthis.handleShowOptions()\n\t\t\t\t\t\tif (event.key.length == 1)\n\t\t\t\t\t\t\tthis.filter += event.key\n\t\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tprivate move(direction: -1 | 0 | 1): void {\n\t\tlet markedIndex = this.items.findIndex(item => item.marked)\n\t\tif (markedIndex == -1)\n\t\t\tmarkedIndex = this.items.findIndex(item => item.selected)\n\t\tif (this.items[markedIndex])\n\t\t\tthis.items[markedIndex].marked = false\n\t\tif (markedIndex == -1)\n\t\t\tmarkedIndex = 0\n\t\tdo {\n\t\t\tmarkedIndex = (markedIndex + direction + this.items.length) % this.items.length\n\t\t} while (this.items[markedIndex].hidden)\n\t\tthis.items[markedIndex].marked = true\n\t}\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\ttabIndex={0}\n\t\t\t\tclass={{ \"has-value\": this.selected.length !== 0 }}\n\t\t\t\tonClick={(event: Event) => this.handleShowOptions(event)}>\n\t\t\t\t<div class=\"select-display\" ref={element => (this.displaySelectedElement = element)}>\n\t\t\t\t\t{this.placeholder}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"icons\" ref={element => (this.iconsDiv = element)}>\n\t\t\t\t\t<slot name=\"end\" />\n\t\t\t\t\t{this.looks == \"border\" && (\n\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\tref={element => (this.toggle = element)}\n\t\t\t\t\t\t\tsize=\"tiny\"\n\t\t\t\t\t\t\tname={this.open ? \"caret-down-outline\" : \"caret-forward-outline\"}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<slot name=\"label\" />\n\t\t\t\t<div class={`${this.open ? \"\" : \"hidden\"} options`}>\n\t\t\t\t\t{this.filter.length > 0 && (\n\t\t\t\t\t\t<smoothly-item selectable={false}>\n\t\t\t\t\t\t\t<smoothly-icon name=\"search-outline\" size=\"small\" />\n\t\t\t\t\t\t\t{this.filter}\n\t\t\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\t\t\tname=\"backspace-outline\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tonClick={e => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tthis.filter = \"\"\n\t\t\t\t\t\t\t\t\tthis.element.focus()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</smoothly-item>\n\t\t\t\t\t)}\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-5963f898.js';
|
|
2
2
|
import { O as Observers$1 } from './p-3263b08f.js';
|
|
3
3
|
import { d as defineCustomElement$5 } from './p-b1fbd693.js';
|
|
4
|
-
import { d as defineCustomElement$4 } from './p-
|
|
4
|
+
import { d as defineCustomElement$4 } from './p-e584d156.js';
|
|
5
5
|
import { d as defineCustomElement$3 } from './p-ef360b5d.js';
|
|
6
6
|
import { d as defineCustomElement$2 } from './p-f4e48a77.js';
|
|
7
7
|
import { d as defineCustomElement$1 } from './p-c569a63b.js';
|
|
@@ -272,4 +272,4 @@ defineCustomElement();
|
|
|
272
272
|
|
|
273
273
|
export { SmoothlyPickerMenu as S, defineCustomElement as d };
|
|
274
274
|
|
|
275
|
-
//# s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AQ,GAAG,CACN,EAChB,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,IAC9B,cAAQ,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,IAC9E,qBAAe,IAAI,EAAC,aAAa,GAAG,CAC5B,IACN,IAAI,CACH,EACN,4DAAK,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,IAClD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;aAChC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;aACvC,GAAG,CAAC,MAAM,KACV,8BAAwB,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,CACnG,CAAC,CACE,CACA,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Observers"],"sources":["src/global/index.ts","src/components/picker/menu/style.css?tag=smoothly-picker-menu&encapsulation=scoped","src/components/picker/menu/index.tsx"],"sourcesContent":["import { Observers } from \"./Observers\"\nexport default function () {\n\treturn { Observers }\n}\n",":host {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 0.5rem;\n\tposition: absolute;\n\tz-index: 4;\n\tleft: -1px;\n\tright: -1px;\n\tmin-width: max-content;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n\tpadding: 0.5rem;\n\tborder: rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px;\n}\n:host:not(.flip) {\n\ttop: 100%;\n}\n:host.flip {\n\tbottom: 100%;\n}\n:host:not([open]) {\n\tdisplay: none;\n}\n:host > div.list {\n\tdisplay: grid;\n\tgrid-template-columns: auto 1fr auto;\n\talign-items: center;\n\trow-gap: 0.5ch;\n\toverflow-y: auto;\n\tmax-height: calc(1.75rem * 10 + 0.5ch * 9);\n\tpadding-right: 0.5rem;\n\tpadding-bottom: 0.25rem;\n}\n:host > .hide {\n\tdisplay: none;\n}\n:host > div.controls {\n\tdisplay: grid;\n\tgrid-template-columns: 1fr auto;\n\tgap: 0.5rem;\n\ttransition: grid-template-columns 200ms linear;\n}\n:host > div.controls > button:disabled {\n\topacity: 0.3;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from \"@stencil/core\"\nimport global from \"../../../global/index\"\nimport { Notice, Option } from \"../../../model\"\nimport { Looks } from \"../../input/Looks\"\nimport { Slot } from \"../slot-elements\"\n\nconst Observers = global().Observers\n\nfunction* chain<T>(...iterables: Iterable<T>[]): Iterable<T> {\n\tfor (const iterable of iterables)\n\t\tyield* iterable\n}\n\nfunction restore<T extends Option>(target: T | undefined, source: Option): T | undefined {\n\ttarget?.set.selected((target.selected = source.selected))\n\ttarget?.set.readonly((target.readonly = source.readonly))\n\ttarget?.set.visible((target.visible = source.visible))\n\ttarget?.set.value((target.value = source.value))\n\ttarget?.set.search((target.search = source.search))\n\treturn target\n}\nfunction restoreListener(ref: HTMLElement | undefined, option: Option) {\n\tref?.addEventListener(\"smoothlyPickerOptionLoad\", (e: CustomEvent<Option>) => restore(e.detail, option))\n}\nexport interface Controls {\n\tremember: () => void\n\trestore: () => void\n\tclear: () => void\n}\n@Component({\n\ttag: \"smoothly-picker-menu\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyPickerMenu {\n\t@Element() element: HTMLSmoothlyPickerMenuElement\n\t@Prop() looks: Looks\n\t@Prop({ reflect: true }) open = false\n\t@Prop({ reflect: true }) multiple = false\n\t@Prop({ reflect: true }) mutable = false\n\t@Prop({ reflect: true }) readonly = false\n\t@Prop() validator?: (value: string) => boolean | { result: boolean; notice: Notice }\n\t@State() backend = new Map<any, Option & { clone: Node }>() // value -> Option\n\t@State() options = new Map<any, Option>() // value -> Option\n\t@State() created = new Map<any, Option.Created>()\n\t@State() search = \"\"\n\t@State() valid = false\n\t@State() display: Node[]\n\t@State() flip = false\n\t@State() flipChecked = false\n\t@Event() notice: EventEmitter<Notice>\n\t@Event() smoothlyPickerMenuLoaded: EventEmitter<Controls>\n\tprivate memory?: { backend: SmoothlyPickerMenu[\"backend\"]; options: SmoothlyPickerMenu[\"options\"] }\n\tprivate listElement?: HTMLElement\n\tprivate searchElement?: HTMLElement\n\n\tcomponentWillLoad() {\n\t\tif (!Observers.has(this.element)) {\n\t\t\tconst threshold = 0.4\n\t\t\tObservers.set(\n\t\t\t\tthis.element,\n\t\t\t\tnew IntersectionObserver(\n\t\t\t\t\tentries =>\n\t\t\t\t\t\t(entries.find(entry => entry.target == this.element)?.intersectionRatio ?? 0) < threshold &&\n\t\t\t\t\t\t!this.flipChecked &&\n\t\t\t\t\t\t((this.flip = !this.flip), (this.flipChecked = true)),\n\t\t\t\t\t{ threshold }\n\t\t\t\t)\n\t\t\t)\n\t\t}\n\t}\n\tcomponentDidLoad() {\n\t\tthis.smoothlyPickerMenuLoaded.emit({\n\t\t\tremember: () => {\n\t\t\t\tthis.memory = {\n\t\t\t\t\tbackend: new Map(Array.from(this.backend.entries(), ([value, option]) => [value, { ...option }])),\n\t\t\t\t\toptions: new Map(Array.from(this.options.entries(), ([value, option]) => [value, { ...option }])),\n\t\t\t\t}\n\t\t\t},\n\t\t\trestore: () => {\n\t\t\t\tif (this.memory) {\n\t\t\t\t\tfor (const option of this.options.values()) {\n\t\t\t\t\t\tconst memory = this.memory.options.get(option.value)\n\t\t\t\t\t\tif (memory != undefined)\n\t\t\t\t\t\t\trestore(option, memory)\n\t\t\t\t\t\telse if (this.created.get(option.value))\n\t\t\t\t\t\t\toption.set.selected((option.selected = false))\n\t\t\t\t\t}\n\t\t\t\t\tfor (const option of this.backend.values()) {\n\t\t\t\t\t\tconst memory = this.memory.backend.get(option.value)\n\t\t\t\t\t\tif (memory != undefined)\n\t\t\t\t\t\t\trestore(option, memory)\n\t\t\t\t\t\telse if (this.created.get(option.value))\n\t\t\t\t\t\t\toption.set.selected((option.selected = false))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tclear: () => {\n\t\t\t\tconst backend = Array.from(this.backend.entries())\n\t\t\t\tbackend.filter(([key]) => this.created.has(key)).forEach(([, option]) => option.set.selected(false))\n\t\t\t\tthis.backend = new Map(backend.filter(([key]) => !this.created.has(key)))\n\t\t\t\tthis.options = new Map(Array.from(this.options.entries()).filter(([key]) => !this.created.has(key)))\n\t\t\t\tthis.created = new Map()\n\t\t\t},\n\t\t})\n\t}\n\tdisconnectedCallback() {\n\t\tif (!this.element.parentElement) {\n\t\t\tObservers.get(this.element)?.disconnect()\n\t\t\tObservers.remove(this.element)\n\t\t}\n\t}\n\t@Watch(\"open\")\n\topenChange() {\n\t\tconst observer = Observers.get(this.element)\n\t\tif (this.open)\n\t\t\tobserver?.observe(this.element)\n\t\telse\n\t\t\tobserver?.unobserve(this.element)\n\t}\n\n\t@Watch(\"readonly\")\n\treadonlyChanged() {\n\t\tfor (const option of chain(this.options.values(), this.backend.values()))\n\t\t\toption.element, option.set.readonly(this.readonly)\n\t}\n\t@Listen(\"scroll\", { target: \"window\" })\n\tscrollHandler() {\n\t\tthis.flipChecked = false\n\t}\n\t@Listen(\"smoothlyPickerOptionLoad\")\n\toptionLoadHandler(event: CustomEvent<Option.Load>) {\n\t\tif (!this.listElement || !event.composedPath().includes(this.listElement)) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.detail.set.readonly(this.readonly)\n\n\t\t\tconst current = this.options.get(event.detail.value)\n\t\t\tif (current)\n\t\t\t\tevent.detail.set.selected(current.element.selected)\n\t\t}\n\t}\n\t@Listen(\"smoothlyPickerOptionLoaded\")\n\toptionLoadedHandler(event: CustomEvent<Option>) {\n\t\tif (!this.listElement || !event.composedPath().includes(this.listElement)) {\n\t\t\tevent.stopPropagation()\n\t\t\tconst current = restore(this.backend.get(event.detail.value), event.detail)\n\t\t\tthis.backend = new Map(\n\t\t\t\tthis.backend\n\t\t\t\t\t.set(event.detail.value, {\n\t\t\t\t\t\t...event.detail,\n\t\t\t\t\t\tclone: current?.clone ?? event.detail.element.cloneNode(true),\n\t\t\t\t\t})\n\t\t\t\t\t.entries()\n\t\t\t)\n\t\t} else\n\t\t\tthis.options.set(event.detail.value, event.detail)\n\t}\n\t@Listen(\"smoothlyPickerOptionChange\")\n\toptionChangeHandler(event: CustomEvent<Option>) {\n\t\tif (!this.listElement || !event.composedPath().includes(this.listElement)) {\n\t\t\tevent.stopPropagation()\n\t\t\tthis.options.get(event.detail.value)?.set.selected(event.detail.selected)\n\t\t} else {\n\t\t\tconst current = this.backend.get(event.detail.value)\n\t\t\tif (current?.element.parentElement)\n\t\t\t\tcurrent?.set.selected(event.detail.selected)\n\t\t}\n\n\t\tif (!this.readonly && !this.multiple && event.detail.selected)\n\t\t\tfor (const option of chain(this.options.values(), this.backend.values()))\n\t\t\t\tif (option.value != event.detail.value)\n\t\t\t\t\toption.set.selected(false)\n\t}\n\tinputHandler(event: CustomEvent<Record<string, any>>) {\n\t\tevent.stopPropagation()\n\t\tthis.search = event.detail.search\n\t\tif (!this.search) {\n\t\t\tthis.valid = false\n\t\t\tfor (const option of chain(this.options.values(), this.backend.values()))\n\t\t\t\toption.set.visible(true)\n\t\t} else {\n\t\t\tthis.valid = !Array.from(this.options.values()).find(option => option.value == this.search)\n\t\t\tconst search = this.search.toLocaleLowerCase()\n\t\t\tfor (const option of chain(this.options.values(), this.backend.values())) {\n\t\t\t\tconst value = option.value.toString().toLocaleLowerCase().includes(search)\n\t\t\t\tconst searches = option.search.some(value => value.includes(search))\n\t\t\t\tconst result = value || searches\n\t\t\t\toption.set.visible(result)\n\t\t\t}\n\t\t}\n\t}\n\taddHandler() {\n\t\tconst validation = !this.validator ? true : this.validator(this.search)\n\t\tif (this.mutable) {\n\t\t\tif (typeof validation == \"object\" ? validation.result : validation) {\n\t\t\t\tif (!this.multiple)\n\t\t\t\t\tfor (const option of chain(this.options.values(), this.backend.values()))\n\t\t\t\t\t\toption.set.selected(false)\n\t\t\t\tthis.created = new Map(this.created.set(this.search, { value: this.search, selected: true }).entries())\n\t\t\t\tthis.search = \"\"\n\t\t\t\tthis.searchElement?.focus()\n\t\t\t\tthis.valid = false\n\t\t\t}\n\t\t\tif (typeof validation == \"object\")\n\t\t\t\tthis.notice.emit(validation.notice)\n\t\t}\n\t}\n\tkeyDownHandler(event: KeyboardEvent) {\n\t\tif (event.key == \"Enter\") {\n\t\t\tevent.preventDefault()\n\t\t\tthis.addHandler()\n\t\t}\n\t}\n\t@Listen(\"smoothlySlotEmpty\")\n\temptyDisplayHandler(event: CustomEvent<Slot>) {\n\t\tevent.stopPropagation()\n\t\tevent.detail.set.nodes(this.display)\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host class={{ valid: this.valid, flip: this.flip }}>\n\t\t\t\t<smoothly-slotted-elements class={\"hide\"} onSmoothlySlottedChange={e => (this.display = e.detail)}>\n\t\t\t\t\t<slot name=\"display\" />\n\t\t\t\t</smoothly-slotted-elements>\n\t\t\t\t<div class={\"hide\"}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t{Array.from(this.created.values(), option => (\n\t\t\t\t\t\t<smoothly-picker-option key={option.value} value={option.value} selected={option.selected}>\n\t\t\t\t\t\t\t{option.value}\n\t\t\t\t\t\t\t<smoothly-slot-elements slot=\"display\" nodes={this.display} />\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t<div class={\"controls\"}>\n\t\t\t\t\t<smoothly-input\n\t\t\t\t\t\tref={e => (this.searchElement = e)}\n\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\tvalue={this.search}\n\t\t\t\t\t\tlooks={this.looks}\n\t\t\t\t\t\tonKeyDown={e => this.keyDownHandler(e)}\n\t\t\t\t\t\tonSmoothlyFormDisable={e => e.stopPropagation()}\n\t\t\t\t\t\tonSmoothlyInput={e => this.inputHandler(e)}\n\t\t\t\t\t\tonSmoothlyChange={e => e.stopPropagation()}\n\t\t\t\t\t\tonSmoothlyBlur={e => e.stopPropagation()}\n\t\t\t\t\t\tonSmoothlyInputLoad={e => e.stopPropagation()}>\n\t\t\t\t\t\t<slot name=\"search\" />\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t{this.mutable && !this.readonly ? (\n\t\t\t\t\t\t<button onClick={() => this.addHandler()} disabled={!this.valid} type={\"button\"}>\n\t\t\t\t\t\t\t<smoothly-icon name=\"add-outline\" />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t\t<div class={\"list\"} ref={e => (this.listElement = e)}>\n\t\t\t\t\t{Array.from(this.backend.values())\n\t\t\t\t\t\t.sort((a, b) => a.position - b.position)\n\t\t\t\t\t\t.map(option => (\n\t\t\t\t\t\t\t<smoothly-slot-elements ref={e => restoreListener(e, option)} clone={false} nodes={option.clone} />\n\t\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-d7242817.js","mappings":";;;;;;;;;IAEC,OAAO,aAAEA,WAAS,EAAE,CAAA;AACrB;;ACHA,MAAM,QAAQ,GAAG,shCAAshC,CAAC;AACxiC,iCAAe,QAAQ;;ACKvB,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC,SAAS,CAAA;AAEpC,UAAU,KAAK,CAAI,GAAG,SAAwB;IAC7C,KAAK,MAAM,QAAQ,IAAI,SAAS;QAC/B,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,SAAS,OAAO,CAAmB,MAAqB,EAAE,MAAc;IACvE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAA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AAG,CAAC,CAAC,QAAQ,CAAC;aACvC,GAAG,CAAC,MAAM,KACV,8BAAwB,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,CACnG,CAAC,CACE,CACA,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Observers"],"sources":["src/global/index.ts","src/components/picker/menu/style.css?tag=smoothly-picker-menu&encapsulation=scoped","src/components/picker/menu/index.tsx"],"sourcesContent":["import { Observers } from \"./Observers\"\nexport default function () {\n\treturn { Observers }\n}\n",":host {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 0.5rem;\n\tposition: absolute;\n\tz-index: 4;\n\tleft: -1px;\n\tright: -1px;\n\tmin-width: max-content;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n\tpadding: 0.5rem;\n\tborder: rgb(var(--text-color, var(--smoothly-color-contrast))) solid 1px;\n}\n:host:not(.flip) {\n\ttop: 100%;\n}\n:host.flip {\n\tbottom: 100%;\n}\n:host:not([open]) {\n\tdisplay: none;\n}\n:host > div.list {\n\tdisplay: grid;\n\tgrid-template-columns: auto 1fr auto;\n\talign-items: center;\n\trow-gap: 0.5ch;\n\toverflow-y: auto;\n\tmax-height: calc(1.75rem * 10 + 0.5ch * 9);\n\tpadding-right: 0.5rem;\n\tpadding-bottom: 0.25rem;\n}\n:host > .hide {\n\tdisplay: none;\n}\n:host > div.controls {\n\tdisplay: grid;\n\tgrid-template-columns: 1fr auto;\n\tgap: 0.5rem;\n\ttransition: grid-template-columns 200ms linear;\n}\n:host > div.controls > button:disabled {\n\topacity: 0.3;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Prop, State, Watch } from \"@stencil/core\"\nimport global from \"../../../global/index\"\nimport { Notice, Option } from \"../../../model\"\nimport { Looks } from \"../../input/Looks\"\nimport { Slot } from \"../slot-elements\"\n\nconst Observers = global().Observers\n\nfunction* chain<T>(...iterables: Iterable<T>[]): Iterable<T> {\n\tfor (const iterable of iterables)\n\t\tyield* iterable\n}\n\nfunction restore<T extends Option>(target: T | undefined, source: Option): T | undefined {\n\ttarget?.set.selected((target.selected = source.selected))\n\ttarget?.set.readonly((target.readonly = source.readonly))\n\ttarget?.set.visible((target.visible = source.visible))\n\ttarget?.set.value((target.value = source.value))\n\ttarget?.set.search((target.search = source.search))\n\treturn target\n}\nfunction restoreListener(ref: HTMLElement | undefined, option: Option) {\n\tref?.addEventListener(\"smoothlyPickerOptionLoad\", (e: CustomEvent<Option>) => restore(e.detail, option))\n}\nexport interface Controls {\n\tremember: () => void\n\trestore: () => void\n\tclear: () => void\n}\n@Component({\n\ttag: \"smoothly-picker-menu\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyPickerMenu {\n\t@Element() element: HTMLSmoothlyPickerMenuElement\n\t@Prop() looks: Looks\n\t@Prop({ reflect: true }) open = false\n\t@Prop({ reflect: true }) multiple = false\n\t@Prop({ reflect: true }) mutable = false\n\t@Prop({ reflect: true }) readonly = false\n\t@Prop() validator?: (value: string) => boolean | { result: boolean; notice: Notice }\n\t@State() backend = new Map<any, Option & { clone: Node }>() // value -> Option\n\t@State() options = new Map<any, Option>() // value -> Option\n\t@State() created = new Map<any, Option.Created>()\n\t@State() search = \"\"\n\t@State() valid = false\n\t@State() display: Node[]\n\t@State() flip = false\n\t@State() flipChecked = false\n\t@Event() notice: EventEmitter<Notice>\n\t@Event() smoothlyPickerMenuLoaded: EventEmitter<Controls>\n\tprivate memory?: { backend: SmoothlyPickerMenu[\"backend\"]; options: SmoothlyPickerMenu[\"options\"] }\n\tprivate listElement?: HTMLElement\n\tprivate searchElement?: HTMLElement\n\n\tcomponentWillLoad() {\n\t\tif (!Observers.has(this.element)) {\n\t\t\tconst threshold = 0.4\n\t\t\tObservers.set(\n\t\t\t\tthis.element,\n\t\t\t\tnew IntersectionObserver(\n\t\t\t\t\tentries =>\n\t\t\t\t\t\t(entries.find(entry => entry.target == this.element)?.intersectionRatio ?? 0) < threshold &&\n\t\t\t\t\t\t!this.flipChecked &&\n\t\t\t\t\t\t((this.flip = !this.flip), (this.flipChecked = true)),\n\t\t\t\t\t{ threshold }\n\t\t\t\t)\n\t\t\t)\n\t\t}\n\t}\n\tcomponentDidLoad() {\n\t\tthis.smoothlyPickerMenuLoaded.emit({\n\t\t\tremember: () => {\n\t\t\t\tthis.memory = {\n\t\t\t\t\tbackend: new Map(Array.from(this.backend.entries(), ([value, option]) => [value, { ...option }])),\n\t\t\t\t\toptions: new Map(Array.from(this.options.entries(), ([value, option]) => [value, { ...option }])),\n\t\t\t\t}\n\t\t\t},\n\t\t\trestore: () => {\n\t\t\t\tif (this.memory) {\n\t\t\t\t\tfor (const option of this.options.values()) {\n\t\t\t\t\t\tconst memory = this.memory.options.get(option.value)\n\t\t\t\t\t\tif (memory != undefined)\n\t\t\t\t\t\t\trestore(option, memory)\n\t\t\t\t\t\telse if (this.created.get(option.value))\n\t\t\t\t\t\t\toption.set.selected((option.selected = false))\n\t\t\t\t\t}\n\t\t\t\t\tfor (const option of this.backend.values()) {\n\t\t\t\t\t\tconst memory = this.memory.backend.get(option.value)\n\t\t\t\t\t\tif (memory != undefined)\n\t\t\t\t\t\t\trestore(option, memory)\n\t\t\t\t\t\telse if (this.created.get(option.value))\n\t\t\t\t\t\t\toption.set.selected((option.selected = false))\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tclear: () => {\n\t\t\t\tconst backend = Array.from(this.backend.entries())\n\t\t\t\tbackend.filter(([key]) => this.created.has(key)).forEach(([, option]) => option.set.selected(false))\n\t\t\t\tthis.backend = new Map(backend.filter(([key]) => !this.created.has(key)))\n\t\t\t\tthis.options = new Map(Array.from(this.options.entries()).filter(([key]) => !this.created.has(key)))\n\t\t\t\tthis.created = new Map()\n\t\t\t},\n\t\t})\n\t}\n\tdisconnectedCallback() {\n\t\tif (!this.element.parentElement) {\n\t\t\tObservers.get(this.element)?.disconnect()\n\t\t\tObservers.remove(this.element)\n\t\t}\n\t}\n\t@Watch(\"open\")\n\topenChange() {\n\t\tconst observer = Observers.get(this.element)\n\t\tif (this.open)\n\t\t\tobserver?.observe(this.element)\n\t\telse\n\t\t\tobserver?.unobserve(this.element)\n\t}\n\n\t@Watch(\"readonly\")\n\treadonlyChanged() {\n\t\tfor (const option of chain(this.options.values(), this.backend.values()))\n\t\t\toption.element, option.set.readonly(this.readonly)\n\t}\n\t@Listen(\"scroll\", { target: \"window\" })\n\tscrollHandler() {\n\t\tthis.flipChecked = false\n\t}\n\t@Listen(\"smoothlyPickerOptionLoad\")\n\toptionLoadHandler(event: CustomEvent<Option.Load>) {\n\t\tif (!this.listElement || !event.composedPath().includes(this.listElement)) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.detail.set.readonly(this.readonly)\n\n\t\t\tconst current = this.options.get(event.detail.value)\n\t\t\tif (current)\n\t\t\t\tevent.detail.set.selected(current.element.selected)\n\t\t}\n\t}\n\t@Listen(\"smoothlyPickerOptionLoaded\")\n\toptionLoadedHandler(event: CustomEvent<Option>) {\n\t\tif (!this.listElement || !event.composedPath().includes(this.listElement)) {\n\t\t\tevent.stopPropagation()\n\t\t\tconst current = restore(this.backend.get(event.detail.value), event.detail)\n\t\t\tthis.backend = new Map(\n\t\t\t\tthis.backend\n\t\t\t\t\t.set(event.detail.value, {\n\t\t\t\t\t\t...event.detail,\n\t\t\t\t\t\tclone: current?.clone ?? event.detail.element.cloneNode(true),\n\t\t\t\t\t})\n\t\t\t\t\t.entries()\n\t\t\t)\n\t\t} else\n\t\t\tthis.options.set(event.detail.value, event.detail)\n\t}\n\t@Listen(\"smoothlyPickerOptionChange\")\n\toptionChangeHandler(event: CustomEvent<Option>) {\n\t\tif (!this.listElement || !event.composedPath().includes(this.listElement)) {\n\t\t\tevent.stopPropagation()\n\t\t\tthis.options.get(event.detail.value)?.set.selected(event.detail.selected)\n\t\t} else {\n\t\t\tconst current = this.backend.get(event.detail.value)\n\t\t\tif (current?.element.parentElement)\n\t\t\t\tcurrent?.set.selected(event.detail.selected)\n\t\t}\n\n\t\tif (!this.readonly && !this.multiple && event.detail.selected)\n\t\t\tfor (const option of chain(this.options.values(), this.backend.values()))\n\t\t\t\tif (option.value != event.detail.value)\n\t\t\t\t\toption.set.selected(false)\n\t}\n\tinputHandler(event: CustomEvent<Record<string, any>>) {\n\t\tevent.stopPropagation()\n\t\tthis.search = event.detail.search\n\t\tif (!this.search) {\n\t\t\tthis.valid = false\n\t\t\tfor (const option of chain(this.options.values(), this.backend.values()))\n\t\t\t\toption.set.visible(true)\n\t\t} else {\n\t\t\tthis.valid = !Array.from(this.options.values()).find(option => option.value == this.search)\n\t\t\tconst search = this.search.toLocaleLowerCase()\n\t\t\tfor (const option of chain(this.options.values(), this.backend.values())) {\n\t\t\t\tconst value = option.value.toString().toLocaleLowerCase().includes(search)\n\t\t\t\tconst searches = option.search.some(value => value.includes(search))\n\t\t\t\tconst result = value || searches\n\t\t\t\toption.set.visible(result)\n\t\t\t}\n\t\t}\n\t}\n\taddHandler() {\n\t\tconst validation = !this.validator ? true : this.validator(this.search)\n\t\tif (this.mutable) {\n\t\t\tif (typeof validation == \"object\" ? validation.result : validation) {\n\t\t\t\tif (!this.multiple)\n\t\t\t\t\tfor (const option of chain(this.options.values(), this.backend.values()))\n\t\t\t\t\t\toption.set.selected(false)\n\t\t\t\tthis.created = new Map(this.created.set(this.search, { value: this.search, selected: true }).entries())\n\t\t\t\tthis.search = \"\"\n\t\t\t\tthis.searchElement?.focus()\n\t\t\t\tthis.valid = false\n\t\t\t}\n\t\t\tif (typeof validation == \"object\")\n\t\t\t\tthis.notice.emit(validation.notice)\n\t\t}\n\t}\n\tkeyDownHandler(event: KeyboardEvent) {\n\t\tif (event.key == \"Enter\") {\n\t\t\tevent.preventDefault()\n\t\t\tthis.addHandler()\n\t\t}\n\t}\n\t@Listen(\"smoothlySlotEmpty\")\n\temptyDisplayHandler(event: CustomEvent<Slot>) {\n\t\tevent.stopPropagation()\n\t\tevent.detail.set.nodes(this.display)\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host class={{ valid: this.valid, flip: this.flip }}>\n\t\t\t\t<smoothly-slotted-elements class={\"hide\"} onSmoothlySlottedChange={e => (this.display = e.detail)}>\n\t\t\t\t\t<slot name=\"display\" />\n\t\t\t\t</smoothly-slotted-elements>\n\t\t\t\t<div class={\"hide\"}>\n\t\t\t\t\t<slot />\n\t\t\t\t\t{Array.from(this.created.values(), option => (\n\t\t\t\t\t\t<smoothly-picker-option key={option.value} value={option.value} selected={option.selected}>\n\t\t\t\t\t\t\t{option.value}\n\t\t\t\t\t\t\t<smoothly-slot-elements slot=\"display\" nodes={this.display} />\n\t\t\t\t\t\t</smoothly-picker-option>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t\t<div class={\"controls\"}>\n\t\t\t\t\t<smoothly-input\n\t\t\t\t\t\tref={e => (this.searchElement = e)}\n\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\tvalue={this.search}\n\t\t\t\t\t\tlooks={this.looks}\n\t\t\t\t\t\tonKeyDown={e => this.keyDownHandler(e)}\n\t\t\t\t\t\tonSmoothlyFormDisable={e => e.stopPropagation()}\n\t\t\t\t\t\tonSmoothlyInput={e => this.inputHandler(e)}\n\t\t\t\t\t\tonSmoothlyChange={e => e.stopPropagation()}\n\t\t\t\t\t\tonSmoothlyBlur={e => e.stopPropagation()}\n\t\t\t\t\t\tonSmoothlyInputLoad={e => e.stopPropagation()}>\n\t\t\t\t\t\t<slot name=\"search\" />\n\t\t\t\t\t</smoothly-input>\n\t\t\t\t\t{this.mutable && !this.readonly ? (\n\t\t\t\t\t\t<button onClick={() => this.addHandler()} disabled={!this.valid} type={\"button\"}>\n\t\t\t\t\t\t\t<smoothly-icon name=\"add-outline\" />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t\t<div class={\"list\"} ref={e => (this.listElement = e)}>\n\t\t\t\t\t{Array.from(this.backend.values())\n\t\t\t\t\t\t.sort((a, b) => a.position - b.position)\n\t\t\t\t\t\t.map(option => (\n\t\t\t\t\t\t\t<smoothly-slot-elements ref={e => restoreListener(e, option)} clone={false} nodes={option.clone} />\n\t\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-5963f898.js';
|
|
2
2
|
|
|
3
|
-
const styleCss = "[selected].sc-smoothly-item-h{background-color:rgb(var(--smoothly-primary-
|
|
3
|
+
const styleCss = "[selected].sc-smoothly-item-h{background-color:rgb(var(--smoothly-primary-color));color:rgb(var(--smoothly-primary-contrast))}.sc-smoothly-item-h{padding:0.5em;cursor:pointer;color:rgb(var(--smoothly-default-contrast));border:rgb(var(--smoothly-default-shade) solid 1px)}[marked].sc-smoothly-item-h,.sc-smoothly-item-h:hover{background-color:rgba(var(--smoothly-primary-tint));color:rgb(var(--smoothly-primary-contrast))}";
|
|
4
4
|
const SmoothlyItemStyle0 = styleCss;
|
|
5
5
|
|
|
6
6
|
const SmoothlyItem = proxyCustomElement(class SmoothlyItem extends H {
|
|
@@ -74,4 +74,4 @@ defineCustomElement();
|
|
|
74
74
|
|
|
75
75
|
export { SmoothlyItem as S, defineCustomElement as d };
|
|
76
76
|
|
|
77
|
-
//# sourceMappingURL=p-
|
|
77
|
+
//# sourceMappingURL=p-df721dfc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-df721dfc.js","mappings":";;AAAA,MAAM,QAAQ,GAAG,uaAAua,CAAC;AACzb,2BAAe,QAAQ;;MCqBV,YAAY;;;;;;;;;0BAKc,IAAI;4BACnB,IAAI;;IAK3B,YAAY;QACX,IAAI,IAAI,CAAC,UAAU,KAAK,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC;YAC3D,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAA;KAC/B;IAED,eAAe;QACd,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;KAC1C;IACD,iBAAiB;QAChB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;YAC3B,OAAM;SACN,CAAC,CAAA;KACF;IACD,gBAAgB;QACf,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU;YACnC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;KAC3C;IAED,MAAM,MAAM,CAAC,MAAc;;QAC1B,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAA;QAC5F,IAAI,CAAC,OAAO,CAAC,MAAM;YAClB,MAAM,IAAI,IAAI,CAAC,UAAU;kBACtB,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;kBAClF,KAAK,CAAA;KACT;IACD,MAAM;QACL,QACC,EAAC,IAAI,qDAAC,QAAQ,EAAE,CAAC,CAAC,IACjB,8DAAQ,CACF,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/item/style.css?tag=smoothly-item&encapsulation=scoped","src/components/item/index.tsx"],"sourcesContent":[":host([selected]) {\n\tbackground-color: rgb(var(--smoothly-primary-color));\n\tcolor: rgb(var(--smoothly-primary-contrast));\n}\n\n:host {\n\tpadding: 0.5em;\n\tcursor: pointer;\n\tcolor: rgb(var(--smoothly-default-contrast));\n\tborder: rgb(var(--smoothly-default-shade) solid 1px);\n}\n\n:host([marked]),\n:host:hover {\n\tbackground-color: rgba(var(--smoothly-primary-tint));\n\tcolor: rgb(var(--smoothly-primary-contrast));\n}\n","import {\n\tComponent,\n\tComponentDidLoad,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tMethod,\n\tProp,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { Item } from \"./Item\"\n\n@Component({\n\ttag: \"smoothly-item\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyItem implements Item, ComponentWillLoad, ComponentDidLoad {\n\t@Element() element: HTMLSmoothlyItemElement\n\t@Prop() value: any\n\t@Prop({ reflect: true, mutable: true }) selected: boolean\n\t@Prop({ reflect: true, mutable: true }) marked: boolean\n\t@Prop({ reflect: true }) selectable = true\n\t@Prop() deselectable = true\n\t@Event() smoothlyItemSelect: EventEmitter<HTMLSmoothlyItemElement>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\n\t@Listen(\"click\")\n\tclickHandler(): void {\n\t\tif (this.selectable && (!this.selected || this.deselectable))\n\t\t\tthis.selected = !this.selected\n\t}\n\t@Watch(\"selected\")\n\tselectedWatcher(): void {\n\t\tthis.smoothlyItemSelect.emit(this.element)\n\t}\n\tcomponentWillLoad(): void {\n\t\tthis.smoothlyInputLoad.emit(() => {\n\t\t\treturn\n\t\t})\n\t}\n\tcomponentDidLoad(): void {\n\t\tif (this.selected && this.selectable)\n\t\t\tthis.smoothlyItemSelect.emit(this.element)\n\t}\n\t@Method()\n\tasync filter(filter: string): Promise<void> {\n\t\tconst value = typeof this.value === \"string\" ? this.value : JSON.stringify(this.value ?? \"\")\n\t\tthis.element.hidden =\n\t\t\tfilter && this.selectable\n\t\t\t\t? !(value.includes(filter) || this.element.innerText.toLowerCase().includes(filter))\n\t\t\t\t: false\n\t}\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host tabIndex={-1}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|