@nanoporetech-digital/components 2.14.0 → 2.14.2
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/CHANGELOG.md +23 -0
- package/dist/cjs/nano-field-validator.cjs.entry.js +30 -19
- package/dist/cjs/nano-field-validator.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-nav-item_2.cjs.entry.js +2 -0
- package/dist/cjs/nano-nav-item_2.cjs.entry.js.map +1 -1
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/alert/alert.js +1 -1
- package/dist/collection/components/algolia/algolia-filter.js +2 -2
- package/dist/collection/components/algolia/algolia-input.js +5 -5
- package/dist/collection/components/algolia/algolia-results.js +1 -1
- package/dist/collection/components/algolia/algolia.js +6 -6
- package/dist/collection/components/checkbox/checkbox-group.js +2 -2
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/datalist/datalist.js +1 -1
- package/dist/collection/components/date-input/date-input.js +8 -8
- package/dist/collection/components/date-picker/date-picker.js +5 -5
- package/dist/collection/components/details/details.js +1 -1
- package/dist/collection/components/dialog/dialog.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/field-validator/field-validator.js +36 -25
- package/dist/collection/components/field-validator/field-validator.js.map +1 -1
- package/dist/collection/components/file-upload/file-upload.js +4 -4
- package/dist/collection/components/global-nav/global-nav.js +4 -4
- package/dist/collection/components/grid/grid-item.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/input/input.js +5 -5
- package/dist/collection/components/nav-item/nav-item.js +4 -4
- package/dist/collection/components/range/range.js +4 -4
- package/dist/collection/components/resize-observe/resize-observe.js +1 -1
- package/dist/collection/components/select/select.js +9 -7
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/slides/slides.js +7 -7
- package/dist/collection/components/tabs/tab-group.js +2 -2
- package/dist/components/nano-field-validator.js +30 -19
- package/dist/components/nano-field-validator.js.map +1 -1
- package/dist/components/select.js +2 -0
- package/dist/components/select.js.map +1 -1
- package/dist/custom-elements/index.js +32 -19
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/nano-field-validator.entry.js +30 -19
- package/dist/esm/nano-field-validator.entry.js.map +1 -1
- package/dist/esm/nano-nav-item_2.entry.js +2 -0
- package/dist/esm/nano-nav-item_2.entry.js.map +1 -1
- package/dist/esm-es5/nano-field-validator.entry.js +1 -1
- package/dist/esm-es5/nano-field-validator.entry.js.map +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js.map +1 -1
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/{p-a1108493.entry.js → p-3f51bdf5.entry.js} +2 -2
- package/dist/nano-components/p-3f51bdf5.entry.js.map +1 -0
- package/dist/nano-components/{p-f268fe08.system.entry.js → p-3f9c097b.system.entry.js} +2 -2
- package/dist/nano-components/p-3f9c097b.system.entry.js.map +1 -0
- package/dist/nano-components/p-3fcb6eea.entry.js +5 -0
- package/dist/nano-components/p-3fcb6eea.entry.js.map +1 -0
- package/dist/nano-components/p-53957ec6.system.js +1 -1
- package/dist/nano-components/{p-e8c4ca40.system.entry.js → p-e7628969.system.entry.js} +2 -2
- package/dist/nano-components/p-e7628969.system.entry.js.map +1 -0
- package/docs-json.json +1 -1
- package/package.json +2 -2
- package/dist/nano-components/p-0a1d463e.entry.js +0 -5
- package/dist/nano-components/p-0a1d463e.entry.js.map +0 -1
- package/dist/nano-components/p-a1108493.entry.js.map +0 -1
- package/dist/nano-components/p-e8c4ca40.system.entry.js.map +0 -1
- package/dist/nano-components/p-f268fe08.system.entry.js.map +0 -1
@@ -474,7 +474,7 @@ export class Input {
|
|
474
474
|
"references": {
|
475
475
|
"Color": {
|
476
476
|
"location": "import",
|
477
|
-
"path": "/builds/
|
477
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
478
478
|
}
|
479
479
|
}
|
480
480
|
},
|
@@ -1045,7 +1045,7 @@ export class Input {
|
|
1045
1045
|
"references": {
|
1046
1046
|
"TextFieldTypes": {
|
1047
1047
|
"location": "import",
|
1048
|
-
"path": "/builds/
|
1048
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1049
1049
|
}
|
1050
1050
|
}
|
1051
1051
|
},
|
@@ -1205,7 +1205,7 @@ export class Input {
|
|
1205
1205
|
"references": {
|
1206
1206
|
"InputChangeEventDetail": {
|
1207
1207
|
"location": "import",
|
1208
|
-
"path": "/builds/
|
1208
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1209
1209
|
}
|
1210
1210
|
}
|
1211
1211
|
}
|
@@ -1294,7 +1294,7 @@ export class Input {
|
|
1294
1294
|
"references": {
|
1295
1295
|
"ControlValidityEventDetail": {
|
1296
1296
|
"location": "import",
|
1297
|
-
"path": "/builds/
|
1297
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1298
1298
|
}
|
1299
1299
|
}
|
1300
1300
|
}
|
@@ -1316,7 +1316,7 @@ export class Input {
|
|
1316
1316
|
},
|
1317
1317
|
"ControlValidity": {
|
1318
1318
|
"location": "import",
|
1319
|
-
"path": "/builds/
|
1319
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1320
1320
|
}
|
1321
1321
|
},
|
1322
1322
|
"return": "Promise<ControlValidity>"
|
@@ -516,7 +516,7 @@ export class NavItem {
|
|
516
516
|
"references": {
|
517
517
|
"NavItemEventDetail": {
|
518
518
|
"location": "import",
|
519
|
-
"path": "/builds/
|
519
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
520
520
|
}
|
521
521
|
}
|
522
522
|
}
|
@@ -536,7 +536,7 @@ export class NavItem {
|
|
536
536
|
"references": {
|
537
537
|
"NavItemEventDetail": {
|
538
538
|
"location": "import",
|
539
|
-
"path": "/builds/
|
539
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
540
540
|
}
|
541
541
|
}
|
542
542
|
}
|
@@ -556,7 +556,7 @@ export class NavItem {
|
|
556
556
|
"references": {
|
557
557
|
"NavItemEventDetail": {
|
558
558
|
"location": "import",
|
559
|
-
"path": "/builds/
|
559
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
560
560
|
}
|
561
561
|
}
|
562
562
|
}
|
@@ -576,7 +576,7 @@ export class NavItem {
|
|
576
576
|
"references": {
|
577
577
|
"NavItemEventDetail": {
|
578
578
|
"location": "import",
|
579
|
-
"path": "/builds/
|
579
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
580
580
|
}
|
581
581
|
}
|
582
582
|
}
|
@@ -370,7 +370,7 @@ export class Range {
|
|
370
370
|
"references": {
|
371
371
|
"Color": {
|
372
372
|
"location": "import",
|
373
|
-
"path": "/builds/
|
373
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
374
374
|
}
|
375
375
|
}
|
376
376
|
},
|
@@ -594,7 +594,7 @@ export class Range {
|
|
594
594
|
"references": {
|
595
595
|
"RangeValue": {
|
596
596
|
"location": "import",
|
597
|
-
"path": "/builds/
|
597
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
598
598
|
}
|
599
599
|
}
|
600
600
|
},
|
@@ -632,7 +632,7 @@ export class Range {
|
|
632
632
|
"references": {
|
633
633
|
"RangeChangeEventDetail": {
|
634
634
|
"location": "import",
|
635
|
-
"path": "/builds/
|
635
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
636
636
|
}
|
637
637
|
}
|
638
638
|
}
|
@@ -655,7 +655,7 @@ export class Range {
|
|
655
655
|
"references": {
|
656
656
|
"StyleEventDetail": {
|
657
657
|
"location": "import",
|
658
|
-
"path": "/builds/
|
658
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
659
659
|
}
|
660
660
|
}
|
661
661
|
}
|
@@ -176,7 +176,7 @@ export class ResizeObserve {
|
|
176
176
|
"references": {
|
177
177
|
"ResizeStateChangeEventDetail": {
|
178
178
|
"location": "import",
|
179
|
-
"path": "/builds/
|
179
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
180
180
|
}
|
181
181
|
}
|
182
182
|
}
|
@@ -99,6 +99,8 @@ export class Select {
|
|
99
99
|
/** nano-dropdown config options you can pass to the nested dropdown component */
|
100
100
|
this.dropDownConfig = {};
|
101
101
|
this.customValidate = () => {
|
102
|
+
if (!this.nativeSelect)
|
103
|
+
return;
|
102
104
|
this.nativeSelect.setCustomValidity('');
|
103
105
|
// add custom validations 'cos html5 validations are a bit rubbish on selects
|
104
106
|
if (this.required && !this.valArray.length) {
|
@@ -683,7 +685,7 @@ export class Select {
|
|
683
685
|
"references": {
|
684
686
|
"Color": {
|
685
687
|
"location": "import",
|
686
|
-
"path": "/builds/
|
688
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
687
689
|
}
|
688
690
|
}
|
689
691
|
},
|
@@ -1064,7 +1066,7 @@ export class Select {
|
|
1064
1066
|
},
|
1065
1067
|
"OptionInterface": {
|
1066
1068
|
"location": "import",
|
1067
|
-
"path": "/builds/
|
1069
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/components/option/option-interface.ts"
|
1068
1070
|
}
|
1069
1071
|
}
|
1070
1072
|
},
|
@@ -1149,7 +1151,7 @@ export class Select {
|
|
1149
1151
|
},
|
1150
1152
|
"Dropdown": {
|
1151
1153
|
"location": "import",
|
1152
|
-
"path": "/builds/
|
1154
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/components/dropdown/dropdown.tsx"
|
1153
1155
|
}
|
1154
1156
|
}
|
1155
1157
|
},
|
@@ -1192,7 +1194,7 @@ export class Select {
|
|
1192
1194
|
"references": {
|
1193
1195
|
"SelectChangeEventDetail": {
|
1194
1196
|
"location": "import",
|
1195
|
-
"path": "/builds/
|
1197
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1196
1198
|
}
|
1197
1199
|
}
|
1198
1200
|
}
|
@@ -1278,7 +1280,7 @@ export class Select {
|
|
1278
1280
|
"references": {
|
1279
1281
|
"InputChangeEventDetail": {
|
1280
1282
|
"location": "import",
|
1281
|
-
"path": "/builds/
|
1283
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1282
1284
|
}
|
1283
1285
|
}
|
1284
1286
|
}
|
@@ -1301,7 +1303,7 @@ export class Select {
|
|
1301
1303
|
"references": {
|
1302
1304
|
"ControlValidityEventDetail": {
|
1303
1305
|
"location": "import",
|
1304
|
-
"path": "/builds/
|
1306
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1305
1307
|
}
|
1306
1308
|
}
|
1307
1309
|
}
|
@@ -1323,7 +1325,7 @@ export class Select {
|
|
1323
1325
|
},
|
1324
1326
|
"ControlValidity": {
|
1325
1327
|
"location": "import",
|
1326
|
-
"path": "/builds/
|
1328
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1327
1329
|
}
|
1328
1330
|
},
|
1329
1331
|
"return": "Promise<ControlValidity>"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,CAAC,EAED,MAAM,GACP,MAAM,eAAe,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n VNode,\n Listen,\n} from '@stencil/core';\n\nimport {\n Color,\n SelectChangeEventDetail,\n InputChangeEventDetail,\n ControlValidityEventDetail,\n ControlValidity,\n} from '../../interface';\nimport {\n debounceEvent,\n createColorClasses,\n closestElement,\n raf,\n getActiveElement,\n debounce,\n} from '../../utils';\nimport type { Dropdown } from '../dropdown/dropdown';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\nimport { OptionInterface } from '../option/option-interface';\n\nlet selectIds = 0;\n\n/**\n * The select component is a wrapper to the HTML select element with custom styling and additional functionality.\n * It accepts most of the same properties as the HTML [select](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).\n * It's multi selection functionality is vastly improved from the native solution. It allows for the control of\n * value order through drag and drop or changing the insertion point with arrow keys. It also can allow for user defined values.\n *\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot down-arrow - use this to replace the default down arrow\n * @slot - default slot; nest `nano-option` elements\n */\n@Component({\n tag: 'nano-select',\n styleUrl: 'select.scss',\n scoped: true,\n})\nexport class Select implements ComponentInterface {\n private nativeSelect?: HTMLSelectElement;\n private valueItems: Array<HTMLSpanElement> = [];\n private dragVal: string;\n private mo?: MutationObserver;\n private selectId = `nano-select-${selectIds++}`;\n private rtl: boolean = false;\n private onInit: boolean = true;\n\n private get inputCtrl() {\n return this._inputCtrl;\n }\n private set inputCtrl(input) {\n if (input === this._inputCtrl) return;\n this._inputCtrl = input;\n this.setDataListOpts();\n }\n private _inputCtrl?: HTMLInputElement;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. Use get/set to set datalist options\n private _selectWrap: HTMLElement;\n private get selectWrap() {\n return this._selectWrap;\n }\n private set selectWrap(ele: HTMLElement) {\n if (this._selectWrap === ele) return;\n this._selectWrap = ele;\n this.setDataListOpts();\n }\n\n private _datalist: HTMLNanoDatalistElement;\n private get datalist() {\n return this._datalist;\n }\n private set datalist(ele: HTMLNanoDatalistElement) {\n if (this._datalist === ele) return;\n this._datalist = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.showInlineValidation = debounce(this.showInlineValidation, 50);\n }\n\n @State() currInsertIndex: number = -1;\n @State() showErrorMsg = false;\n @State() errorMessage: string = '';\n @State() hasFocus = false;\n @State() hasLabelSlot: boolean = false;\n @State() hasHelperSlot: boolean = false;\n @State() hasHelperEndSlot = false;\n @State() inputSearchVal: string = '';\n\n @Element() el!: HTMLNanoSelectElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set.\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeSelect) return '';\n return this.nativeSelect.validationMessage;\n }\n\n /**\n * The color to use from your application's color palette.\n * Default options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\n */\n @Prop() color?: Color;\n\n /**\n * This Boolean attribute lets you specify that a form control should have select focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the select.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn?: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively use the 'label' slot\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.selectId + '-name';\n\n /**\n * Instructional text that shows before the select has a value. Text set here will be placed inside the label when a value is set. If you don't want this behaviour just set the first option to have no value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * The initial size of the control.\n */\n @Prop() size?: number;\n\n /**\n * Maximum number of options that can be selected when multiple is true\n */\n @Prop() max?: number;\n\n /**\n * Minimum number of options that can be selected when multiple is true\n */\n @Prop() min?: number;\n\n /**\n * The form element to associate the select with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * in multiple mode, allow users to enter their own values\n */\n @Prop() allowCustomValues: boolean = false;\n\n /**\n * The value of the select.\n */\n @Prop()\n get value() {\n return this._value;\n }\n set value(val: string | string[]) {\n if (typeof val === 'string') {\n if (this.multiple) this._value = val.split(',');\n else this._value = val;\n } else if (Array.isArray(val)) {\n if (this.multiple) this._value = val;\n else this._value = val[0];\n }\n }\n private _value: Array<string> | string = this.multiple ? [] : '';\n\n /**\n * You can set options via js as an array of strings: `domElement.options = ['option 1', 'option 2']` or\n * objects `domElement.options = [{label: 'option 1', value: 'opt-1'}]`. See `nano-option` docs for all available properties.\n * Alternatively, you can nest `<nano-option>` elements within a `<nano-select>`\n * Regardless - reading `options` will return the current component options - slotted or otherwise\n */\n @Prop()\n get options(): Array<OptionInterface | string> {\n if (this._options.length) return this._options;\n\n if (!this.datalist || !this.datalist.activeOptions) return [];\n\n return this._eOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n }\n set options(opts: Array<OptionInterface | string>) {\n this._options = opts.map((opt) => {\n if (typeof opt === 'string') return { value: opt, label: opt };\n else return opt;\n });\n }\n private _options: OptionInterface[] = [];\n @State() _eOptions: OptionInterface[] = [];\n\n /**\n * If `true`, a clear icon will appear in the select when there is a value. Clicking it clears the select.\n */\n @Prop() clearSelect = false;\n\n /**\n * Hide the native select element and cover with a value 'mask'.\n * Enables a fluid nano-select width upon value change (if required). Doesn't work with multiple=\"true\".\n */\n @Prop() mask = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoSearchChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoSearchChange = debounceEvent(this.nanoSearchChange, this.debounce);\n }\n\n @Watch('required')\n @Watch('disabled')\n @Watch('min')\n @Watch('max')\n @Watch('readonly')\n protected shouldValidate() {\n if (this.onInit) return;\n if (this.invalid) this.showErrorMsg = this._invalid = false;\n\n this.customValidate();\n if (this.validateOn !== 'dirty') return;\n this.showInlineValidation();\n }\n\n /**\n * Update the native select element when the value changes\n */\n // eslint-disable-next-line @stencil/no-unused-watch\n @Watch('value')\n valueChanged() {\n this.customValidate();\n\n if (this.onInit) {\n if (this.multiple) this.currInsertIndex = this.value.length - 1;\n return;\n }\n requestAnimationFrame(() => {\n this.shouldValidate();\n this.nanoChange.emit({ value: this.value });\n });\n }\n\n /** nano-dropdown config options you can pass to the nested dropdown component */\n @Prop({ mutable: true }) dropDownConfig?: Partial<Dropdown> = {};\n\n @Watch('dropDownConfig')\n setDataListOpts() {\n if (!this.datalist || !this.selectWrap) return;\n\n this.datalist.input = this.inputCtrl;\n\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n ...this.dropDownConfig,\n tetherTo: this.selectWrap,\n };\n }\n\n // Custom Events\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<SelectChangeEventDetail>;\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the select has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred on a multiple=\"true\" input\n */\n @Event() nanoSearchChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n // Public Methods\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) {\n this.customValidate();\n this.showInlineValidation();\n }\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeSelect.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-select`. Use this method instead of the global\n * `select.focus()`.\n */\n @Method()\n async setFocus() {\n if (!this.inputCtrl) return;\n this.inputCtrl.focus();\n setTimeout(() => this.inputCtrl.click(), 50);\n }\n\n /**\n * Returns the native `<select>` element used under the hood.\n */\n @Method()\n getSelectElement(): Promise<HTMLSelectElement> {\n return Promise.resolve(this.nativeSelect!);\n }\n\n /**\n * Invalidate the field and show a custom error message.\n * To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeSelect) {\n this.nativeSelect.setCustomValidity(message);\n this.showInlineValidation();\n }\n }\n\n /* Logic */\n\n private get valArray() {\n return typeof this.value === 'string'\n ? this.value.length\n ? [this.value]\n : []\n : this.value;\n }\n\n private isValidValues() {\n return this.valArray.find((val) =>\n (this.options as OptionInterface[]).find((opt) => opt.value === val)\n );\n }\n\n private customValidate = () => {\n this.nativeSelect.setCustomValidity('');\n\n // add custom validations 'cos html5 validations are a bit rubbish on selects\n if (this.required && !this.valArray.length) {\n this.nativeSelect.setCustomValidity('Please fill in this field.');\n return true;\n }\n if (\n this.valArray.length &&\n !this.allowCustomValues &&\n !this.isValidValues()\n ) {\n this.nativeSelect.setCustomValidity(\n 'Please choose an item from this field.'\n );\n return true;\n }\n if (this.max && this.valArray.length > this.max) {\n this.nativeSelect.setCustomValidity(\n `Only up to ${this.max} values are allowed.`\n );\n return true;\n }\n if (this.min && this.valArray.length < this.min) {\n this.nativeSelect.setCustomValidity(\n `You must select a minimum of ${this.min} values.`\n );\n return true;\n }\n return false;\n };\n\n private showInlineValidation = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n this._invalid = false;\n this.showErrorMsg = false;\n this.errorMessage = '';\n\n if (!this.nativeSelect.validity.valid) {\n this.errorMessage = this.nativeSelect.validationMessage;\n this._invalid = true;\n this.showErrorMsg = true;\n }\n this.nanoValidate.emit({\n isValid: !this.invalid,\n errorMessage: this.errorMessage,\n originalEvent: ev,\n });\n };\n\n private handleInvalid = (ev: Event) => {\n this._invalid = true;\n\n if (this.validateOn === 'submit') {\n this._invalid = this.showErrorMsg = this.customValidate();\n }\n if (this.showInlineError) ev.preventDefault();\n\n requestAnimationFrame(() => this.showInlineValidation(ev));\n };\n\n private setValue = (e: CustomEvent<HTMLNanoOptionElement>) => {\n e.preventDefault();\n\n if (!this.multiple) {\n this.value = e.detail.value;\n return;\n }\n if (this.value && this.value.length && this.value.includes(e.detail.value))\n return;\n if (this.max && this.value.length === this.max) return;\n\n this.currInsertIndex++;\n this.value = [\n ...this.value.slice(0, this.currInsertIndex),\n e.detail.value,\n ...this.value.slice(this.currInsertIndex),\n ];\n this.inputSearchVal = '';\n // this.selectWrap.clientWidth; // force reflow\n };\n\n private removeValue = (toFind?: string) => {\n if (!this.multiple || !this.value.length) return;\n\n if (!toFind) toFind = this.value[this.value.length - 1];\n this.value = (this.value as Array<string>).filter((val) => val !== toFind);\n\n this.currInsertIndex--;\n // this.selectWrap.clientWidth; // force reflow\n this.setFocus();\n };\n\n private slotChangeObserver() {\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / helper content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]').length;\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n\n // breaking change introduced in v2. Rm in v3\n if (\n !!this.el.querySelector('select:not([class*=\"sc-nano-select\"]) option')\n ) {\n console.warn(\n 'nesting `<option>` elements was removed in v2. Please update your code to use `<nano-option>` elements instead.',\n this.el\n );\n }\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"legacy\"]')) {\n console.warn(\n 'The `legacy` slot has been removed. Please update your code',\n this.el\n );\n }\n }\n\n private getLabel(toFind: string) {\n let label = (this.options as OptionInterface[]).find((opt) => {\n return !opt.disabled && opt.value?.length && opt.value === toFind;\n });\n return label && label.label ? label.label : toFind;\n }\n\n /* Event handling */\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.clearSelectValue();\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n raf(() => {\n if (kev.key) {\n if (kev.key !== 'Tab') return;\n target = getActiveElement();\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private setOptions = () => {\n if (\n !this.datalist ||\n !this.datalist.activeOptions ||\n !this.datalist.activeOptions.length\n )\n return;\n\n this._eOptions = this.datalist.activeOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n this.customValidate();\n };\n\n private handleDocumentKeyDown = (ev: KeyboardEvent) => {\n if (!this.multiple || !this.hasFocus) return;\n\n if (!this.inputSearchVal) {\n let rm: HTMLSpanElement;\n\n switch (ev.key) {\n case 'Backspace':\n if (this.inputCtrl.previousElementSibling)\n rm = this.inputCtrl.previousElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'Delete':\n if (this.inputCtrl.nextElementSibling)\n rm = this.inputCtrl.nextElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'ArrowLeft':\n case 'ArrowRight':\n if (!this.value.length) break;\n\n if (ev.key === 'ArrowLeft' && this.inputCtrl.previousSibling)\n this.currInsertIndex--;\n if (ev.key === 'ArrowRight' && this.inputCtrl.nextSibling)\n this.currInsertIndex++;\n\n setTimeout(() => {\n this.inputCtrl.focus();\n }, 20);\n ev.preventDefault();\n break;\n }\n }\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty' && !this.hasFocus)\n this.showInlineValidation();\n });\n this.nanoBlur.emit();\n\n if (!this.allowCustomValues && this.multiple) {\n this.inputSearchVal = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n }\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.nanoFocus.emit();\n };\n\n private clearSelectValue = (ev?: Event) => {\n if (this.clearSelect && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (this.multiple) {\n this.value = [];\n this.currInsertIndex = -1;\n } else this.value = '';\n\n this.inputCtrl.value = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n };\n\n private onClick = () => {\n this.setFocus();\n };\n\n /* Multi event handlers */\n\n private onDragStart = (ev: MouseEvent) => {\n let ele = ev.target as HTMLSpanElement;\n this.dragVal = ele.dataset.value;\n };\n\n private onDragEnd = (ev) => {\n this.dragVal = null;\n ev.preventDefault();\n };\n\n private onDragLeave = (ev: MouseEvent) => {\n let ele = ev.target as HTMLSpanElement;\n let spanVal: string =\n ele.dataset && ele.dataset.value ? ele.dataset.value : null;\n\n if (\n !spanVal ||\n this.dragVal === spanVal ||\n !this.value.includes(this.dragVal)\n ) {\n ev.preventDefault();\n return;\n }\n\n let to = this.value.indexOf(spanVal);\n let from = this.value.indexOf(this.dragVal);\n let tmpArr = this.value as Array<string>;\n let tmpVal = tmpArr[to];\n\n tmpArr[to] = tmpArr[from];\n tmpArr[from] = tmpVal;\n this.value = [...tmpArr];\n };\n\n private onMultiInput = (ev) => {\n this.inputSearchVal = ev.target.value.trim();\n this.nanoSearchChange.emit({ value: ev.target.value.trim() });\n };\n\n /* Stencil Component lifecycle hooks */\n\n connectedCallback() {\n this.debounceChanged();\n\n if (!Build.isBrowser) return;\n\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n\n disconnectedCallback() {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n\n if (!Build.isBrowser) return;\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.customValidate();\n this.setDataListOpts();\n raf(() => (this.onInit = false));\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const labelId = this.selectId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot\n ? this.selectId + '-moreId'\n : '';\n const helperEndId = this.hasHelperEndSlot ? this.selectId + '-helper' : '';\n\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n this.valueItems = [];\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: !!this.value.length || !!this.inputSearchVal.length,\n controlId: this.selectId,\n };\n\n const controlOptions = (({ readonly, disabled }) => ({\n readonly,\n disabled,\n clearControl: this.clearSelect,\n }))(this);\n\n return (\n <Host\n type={this.multiple ? 'select-multiple' : 'select-one'}\n aria-disabled={this.disabled ? 'true' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': !!this.value.length || !!this.inputSearchVal.length,\n 'has-focus': this.hasFocus,\n 'is-invalid': this.invalid,\n 'has-label': this.label !== null && !this.floatLabel,\n 'has-float-label': this.label !== null && this.floatLabel,\n rtl: this.rtl,\n 'has-multiple': this.multiple,\n 'has-clr-btn': this.clearSelect,\n masked: this.mask,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearSelectValue}\n control={this.el}\n ref={(el) => (this.selectWrap = el)}\n endValueSlot={\n <slot name=\"down-arrow\">\n <nano-icon slot=\"value-end\" name=\"light/chevron-down\" />\n </slot>\n }\n >\n {this.multiple && (\n <div class=\"select__multi-wrap select\">\n {this.multipleValues(labelId, moreId, helperEndId)}\n </div>\n )}\n {!this.multiple && [\n this.mask && (\n <div class=\"select__mask\">\n {this.getLabel(this.value as string)}\n </div>\n ),\n <input\n id={this.selectId}\n class=\"select__native-input\"\n ref={(input) => (this.inputCtrl = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n placeholder={this.placeholder}\n readOnly={true}\n required={this.required}\n value={this.getLabel(this.value as string)}\n onFocus={this.onFocus}\n />,\n ]}\n </FormControl>\n </FormControlWrap>\n {!this.readonly && !this.disabled && (\n <nano-datalist\n onNanoOptionsUpdated={this.setOptions}\n ref={(el) => (this.datalist = el)}\n selected={this.valArray}\n type={this.multiple ? 'selctMulti' : 'select'}\n onNanoSelect={this.setValue}\n onNanoDeselect={(e) => {\n e.preventDefault();\n this.removeValue(e.detail.value);\n }}\n options={this._options.length ? this._options : undefined}\n >\n {this.allowCustomValues && this.multiple && !!this.inputSearchVal && (\n <nano-option\n slot=\"list-top\"\n value={this.inputSearchVal}\n selected={false}\n label={this.inputSearchVal}\n onNanoSelect={() => this.inputCtrl.focus()}\n >\n <span slot=\"check-icon\"></span>\n Add '{this.inputSearchVal}'\n </nano-option>\n )}\n <slot />\n </nano-datalist>\n )}\n\n <select\n id={this.selectId + '-hidden'}\n class=\"select__native-ctrl\"\n ref={(select) => (this.nativeSelect = select)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n multiple={this.multiple}\n name={this.name}\n required={this.required}\n onInvalid={this.handleInvalid}\n >\n {this.allowCustomValues &&\n this.valArray.map((val) => {\n return (\n <option value={val} selected={true}>\n {val}\n </option>\n );\n })}\n {!this.allowCustomValues &&\n this.options.map((opt: OptionInterface) => {\n return (\n <option\n value={opt.value}\n selected={this.valArray.includes(opt.value)}\n disabled={opt.disabled}\n label={opt.label}\n >\n {this.valArray.includes(opt.value)}\n </option>\n );\n })}\n </select>\n </Host>\n );\n }\n\n private multipleValues(\n labelId: string,\n moreId: string,\n helperEndId: string\n ): VNode | (VNode | VNode[])[] {\n let input: VNode = (\n <input\n class=\"select__multi-input\"\n id={this.selectId}\n ref={(input) => (this.inputCtrl = input)}\n readOnly={this.readonly}\n disabled={this.disabled}\n autoFocus={this.autofocus}\n autocomplete=\"off\"\n onKeyDown={this.handleDocumentKeyDown}\n onInput={this.onMultiInput}\n value={this.inputSearchVal}\n onTouchStart={this.onClick}\n onMouseDown={this.onClick}\n onFocus={this.onFocus}\n placeholder={\n this.placeholder && !this.value.length ? this.placeholder : ''\n }\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n />\n );\n if (!this.value.length) return input;\n\n return (this.value as Array<string>).map((val, i) => {\n let toReturn: VNode | VNode[] = (\n <span\n onDragStart={this.onDragStart}\n onDragLeave={this.onDragLeave}\n onDragEnd={this.onDragEnd}\n onDragOver={(e) => e.preventDefault()}\n draggable\n data-value={val}\n ref={(span) => this.valueItems.push(span)}\n class=\"select__multi-value\"\n >\n <span>{this.getLabel(val)}</span>\n <button\n class=\"select__multi-value-remove\"\n type=\"button\"\n tabindex=\"-1\"\n onTouchEnd={() => {\n this.removeValue(val);\n }}\n onMouseUp={() => {\n this.removeValue(val);\n }}\n >\n <nano-icon name=\"light/times\"></nano-icon>\n </button>\n </span>\n );\n if (i === 0 && this.currInsertIndex < 0)\n toReturn = [input, toReturn as VNode];\n else if (i === this.currInsertIndex)\n toReturn = [toReturn as VNode, input];\n return toReturn;\n });\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,SAAS,EAET,OAAO,EACP,KAAK,EAEL,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,CAAC,EAED,MAAM,GACP,MAAM,eAAe,CAAC;AASvB,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,GAAG,EACH,gBAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n VNode,\n Listen,\n} from '@stencil/core';\n\nimport {\n Color,\n SelectChangeEventDetail,\n InputChangeEventDetail,\n ControlValidityEventDetail,\n ControlValidity,\n} from '../../interface';\nimport {\n debounceEvent,\n createColorClasses,\n closestElement,\n raf,\n getActiveElement,\n debounce,\n} from '../../utils';\nimport type { Dropdown } from '../dropdown/dropdown';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\nimport { OptionInterface } from '../option/option-interface';\n\nlet selectIds = 0;\n\n/**\n * The select component is a wrapper to the HTML select element with custom styling and additional functionality.\n * It accepts most of the same properties as the HTML [select](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).\n * It's multi selection functionality is vastly improved from the native solution. It allows for the control of\n * value order through drag and drop or changing the insertion point with arrow keys. It also can allow for user defined values.\n *\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secodary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot down-arrow - use this to replace the default down arrow\n * @slot - default slot; nest `nano-option` elements\n */\n@Component({\n tag: 'nano-select',\n styleUrl: 'select.scss',\n scoped: true,\n})\nexport class Select implements ComponentInterface {\n private nativeSelect?: HTMLSelectElement;\n private valueItems: Array<HTMLSpanElement> = [];\n private dragVal: string;\n private mo?: MutationObserver;\n private selectId = `nano-select-${selectIds++}`;\n private rtl: boolean = false;\n private onInit: boolean = true;\n\n private get inputCtrl() {\n return this._inputCtrl;\n }\n private set inputCtrl(input) {\n if (input === this._inputCtrl) return;\n this._inputCtrl = input;\n this.setDataListOpts();\n }\n private _inputCtrl?: HTMLInputElement;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. Use get/set to set datalist options\n private _selectWrap: HTMLElement;\n private get selectWrap() {\n return this._selectWrap;\n }\n private set selectWrap(ele: HTMLElement) {\n if (this._selectWrap === ele) return;\n this._selectWrap = ele;\n this.setDataListOpts();\n }\n\n private _datalist: HTMLNanoDatalistElement;\n private get datalist() {\n return this._datalist;\n }\n private set datalist(ele: HTMLNanoDatalistElement) {\n if (this._datalist === ele) return;\n this._datalist = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.showInlineValidation = debounce(this.showInlineValidation, 50);\n }\n\n @State() currInsertIndex: number = -1;\n @State() showErrorMsg = false;\n @State() errorMessage: string = '';\n @State() hasFocus = false;\n @State() hasLabelSlot: boolean = false;\n @State() hasHelperSlot: boolean = false;\n @State() hasHelperEndSlot = false;\n @State() inputSearchVal: string = '';\n\n @Element() el!: HTMLNanoSelectElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set.\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeSelect) return '';\n return this.nativeSelect.validationMessage;\n }\n\n /**\n * The color to use from your application's color palette.\n * Default options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\n */\n @Prop() color?: Color;\n\n /**\n * This Boolean attribute lets you specify that a form control should have select focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the select.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn?: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively use the 'label' slot\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.selectId + '-name';\n\n /**\n * Instructional text that shows before the select has a value. Text set here will be placed inside the label when a value is set. If you don't want this behaviour just set the first option to have no value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * The initial size of the control.\n */\n @Prop() size?: number;\n\n /**\n * Maximum number of options that can be selected when multiple is true\n */\n @Prop() max?: number;\n\n /**\n * Minimum number of options that can be selected when multiple is true\n */\n @Prop() min?: number;\n\n /**\n * The form element to associate the select with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * in multiple mode, allow users to enter their own values\n */\n @Prop() allowCustomValues: boolean = false;\n\n /**\n * The value of the select.\n */\n @Prop()\n get value() {\n return this._value;\n }\n set value(val: string | string[]) {\n if (typeof val === 'string') {\n if (this.multiple) this._value = val.split(',');\n else this._value = val;\n } else if (Array.isArray(val)) {\n if (this.multiple) this._value = val;\n else this._value = val[0];\n }\n }\n private _value: Array<string> | string = this.multiple ? [] : '';\n\n /**\n * You can set options via js as an array of strings: `domElement.options = ['option 1', 'option 2']` or\n * objects `domElement.options = [{label: 'option 1', value: 'opt-1'}]`. See `nano-option` docs for all available properties.\n * Alternatively, you can nest `<nano-option>` elements within a `<nano-select>`\n * Regardless - reading `options` will return the current component options - slotted or otherwise\n */\n @Prop()\n get options(): Array<OptionInterface | string> {\n if (this._options.length) return this._options;\n\n if (!this.datalist || !this.datalist.activeOptions) return [];\n\n return this._eOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n }\n set options(opts: Array<OptionInterface | string>) {\n this._options = opts.map((opt) => {\n if (typeof opt === 'string') return { value: opt, label: opt };\n else return opt;\n });\n }\n private _options: OptionInterface[] = [];\n @State() _eOptions: OptionInterface[] = [];\n\n /**\n * If `true`, a clear icon will appear in the select when there is a value. Clicking it clears the select.\n */\n @Prop() clearSelect = false;\n\n /**\n * Hide the native select element and cover with a value 'mask'.\n * Enables a fluid nano-select width upon value change (if required). Doesn't work with multiple=\"true\".\n */\n @Prop() mask = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoSearchChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoSearchChange = debounceEvent(this.nanoSearchChange, this.debounce);\n }\n\n @Watch('required')\n @Watch('disabled')\n @Watch('min')\n @Watch('max')\n @Watch('readonly')\n protected shouldValidate() {\n if (this.onInit) return;\n if (this.invalid) this.showErrorMsg = this._invalid = false;\n\n this.customValidate();\n if (this.validateOn !== 'dirty') return;\n this.showInlineValidation();\n }\n\n /**\n * Update the native select element when the value changes\n */\n // eslint-disable-next-line @stencil/no-unused-watch\n @Watch('value')\n valueChanged() {\n this.customValidate();\n\n if (this.onInit) {\n if (this.multiple) this.currInsertIndex = this.value.length - 1;\n return;\n }\n requestAnimationFrame(() => {\n this.shouldValidate();\n this.nanoChange.emit({ value: this.value });\n });\n }\n\n /** nano-dropdown config options you can pass to the nested dropdown component */\n @Prop({ mutable: true }) dropDownConfig?: Partial<Dropdown> = {};\n\n @Watch('dropDownConfig')\n setDataListOpts() {\n if (!this.datalist || !this.selectWrap) return;\n\n this.datalist.input = this.inputCtrl;\n\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n ...this.dropDownConfig,\n tetherTo: this.selectWrap,\n };\n }\n\n // Custom Events\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<SelectChangeEventDetail>;\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the select has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred on a multiple=\"true\" input\n */\n @Event() nanoSearchChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n // Public Methods\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) {\n this.customValidate();\n this.showInlineValidation();\n }\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeSelect.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-select`. Use this method instead of the global\n * `select.focus()`.\n */\n @Method()\n async setFocus() {\n if (!this.inputCtrl) return;\n this.inputCtrl.focus();\n setTimeout(() => this.inputCtrl.click(), 50);\n }\n\n /**\n * Returns the native `<select>` element used under the hood.\n */\n @Method()\n getSelectElement(): Promise<HTMLSelectElement> {\n return Promise.resolve(this.nativeSelect!);\n }\n\n /**\n * Invalidate the field and show a custom error message.\n * To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeSelect) {\n this.nativeSelect.setCustomValidity(message);\n this.showInlineValidation();\n }\n }\n\n /* Logic */\n\n private get valArray() {\n return typeof this.value === 'string'\n ? this.value.length\n ? [this.value]\n : []\n : this.value;\n }\n\n private isValidValues() {\n return this.valArray.find((val) =>\n (this.options as OptionInterface[]).find((opt) => opt.value === val)\n );\n }\n\n private customValidate = () => {\n if (!this.nativeSelect) return;\n\n this.nativeSelect.setCustomValidity('');\n // add custom validations 'cos html5 validations are a bit rubbish on selects\n if (this.required && !this.valArray.length) {\n this.nativeSelect.setCustomValidity('Please fill in this field.');\n return true;\n }\n if (\n this.valArray.length &&\n !this.allowCustomValues &&\n !this.isValidValues()\n ) {\n this.nativeSelect.setCustomValidity(\n 'Please choose an item from this field.'\n );\n return true;\n }\n if (this.max && this.valArray.length > this.max) {\n this.nativeSelect.setCustomValidity(\n `Only up to ${this.max} values are allowed.`\n );\n return true;\n }\n if (this.min && this.valArray.length < this.min) {\n this.nativeSelect.setCustomValidity(\n `You must select a minimum of ${this.min} values.`\n );\n return true;\n }\n return false;\n };\n\n private showInlineValidation = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n this._invalid = false;\n this.showErrorMsg = false;\n this.errorMessage = '';\n\n if (!this.nativeSelect.validity.valid) {\n this.errorMessage = this.nativeSelect.validationMessage;\n this._invalid = true;\n this.showErrorMsg = true;\n }\n this.nanoValidate.emit({\n isValid: !this.invalid,\n errorMessage: this.errorMessage,\n originalEvent: ev,\n });\n };\n\n private handleInvalid = (ev: Event) => {\n this._invalid = true;\n\n if (this.validateOn === 'submit') {\n this._invalid = this.showErrorMsg = this.customValidate();\n }\n if (this.showInlineError) ev.preventDefault();\n\n requestAnimationFrame(() => this.showInlineValidation(ev));\n };\n\n private setValue = (e: CustomEvent<HTMLNanoOptionElement>) => {\n e.preventDefault();\n\n if (!this.multiple) {\n this.value = e.detail.value;\n return;\n }\n if (this.value && this.value.length && this.value.includes(e.detail.value))\n return;\n if (this.max && this.value.length === this.max) return;\n\n this.currInsertIndex++;\n this.value = [\n ...this.value.slice(0, this.currInsertIndex),\n e.detail.value,\n ...this.value.slice(this.currInsertIndex),\n ];\n this.inputSearchVal = '';\n // this.selectWrap.clientWidth; // force reflow\n };\n\n private removeValue = (toFind?: string) => {\n if (!this.multiple || !this.value.length) return;\n\n if (!toFind) toFind = this.value[this.value.length - 1];\n this.value = (this.value as Array<string>).filter((val) => val !== toFind);\n\n this.currInsertIndex--;\n // this.selectWrap.clientWidth; // force reflow\n this.setFocus();\n };\n\n private slotChangeObserver() {\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / helper content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]').length;\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n\n // breaking change introduced in v2. Rm in v3\n if (\n !!this.el.querySelector('select:not([class*=\"sc-nano-select\"]) option')\n ) {\n console.warn(\n 'nesting `<option>` elements was removed in v2. Please update your code to use `<nano-option>` elements instead.',\n this.el\n );\n }\n\n // breaking change introduced in v2. Rm in v3\n if (!!this.el.querySelector('[slot=\"legacy\"]')) {\n console.warn(\n 'The `legacy` slot has been removed. Please update your code',\n this.el\n );\n }\n }\n\n private getLabel(toFind: string) {\n let label = (this.options as OptionInterface[]).find((opt) => {\n return !opt.disabled && opt.value?.length && opt.value === toFind;\n });\n return label && label.label ? label.label : toFind;\n }\n\n /* Event handling */\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.clearSelectValue();\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n raf(() => {\n if (kev.key) {\n if (kev.key !== 'Tab') return;\n target = getActiveElement();\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private setOptions = () => {\n if (\n !this.datalist ||\n !this.datalist.activeOptions ||\n !this.datalist.activeOptions.length\n )\n return;\n\n this._eOptions = this.datalist.activeOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n this.customValidate();\n };\n\n private handleDocumentKeyDown = (ev: KeyboardEvent) => {\n if (!this.multiple || !this.hasFocus) return;\n\n if (!this.inputSearchVal) {\n let rm: HTMLSpanElement;\n\n switch (ev.key) {\n case 'Backspace':\n if (this.inputCtrl.previousElementSibling)\n rm = this.inputCtrl.previousElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'Delete':\n if (this.inputCtrl.nextElementSibling)\n rm = this.inputCtrl.nextElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'ArrowLeft':\n case 'ArrowRight':\n if (!this.value.length) break;\n\n if (ev.key === 'ArrowLeft' && this.inputCtrl.previousSibling)\n this.currInsertIndex--;\n if (ev.key === 'ArrowRight' && this.inputCtrl.nextSibling)\n this.currInsertIndex++;\n\n setTimeout(() => {\n this.inputCtrl.focus();\n }, 20);\n ev.preventDefault();\n break;\n }\n }\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty' && !this.hasFocus)\n this.showInlineValidation();\n });\n this.nanoBlur.emit();\n\n if (!this.allowCustomValues && this.multiple) {\n this.inputSearchVal = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n }\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.nanoFocus.emit();\n };\n\n private clearSelectValue = (ev?: Event) => {\n if (this.clearSelect && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (this.multiple) {\n this.value = [];\n this.currInsertIndex = -1;\n } else this.value = '';\n\n this.inputCtrl.value = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n };\n\n private onClick = () => {\n this.setFocus();\n };\n\n /* Multi event handlers */\n\n private onDragStart = (ev: MouseEvent) => {\n let ele = ev.target as HTMLSpanElement;\n this.dragVal = ele.dataset.value;\n };\n\n private onDragEnd = (ev) => {\n this.dragVal = null;\n ev.preventDefault();\n };\n\n private onDragLeave = (ev: MouseEvent) => {\n let ele = ev.target as HTMLSpanElement;\n let spanVal: string =\n ele.dataset && ele.dataset.value ? ele.dataset.value : null;\n\n if (\n !spanVal ||\n this.dragVal === spanVal ||\n !this.value.includes(this.dragVal)\n ) {\n ev.preventDefault();\n return;\n }\n\n let to = this.value.indexOf(spanVal);\n let from = this.value.indexOf(this.dragVal);\n let tmpArr = this.value as Array<string>;\n let tmpVal = tmpArr[to];\n\n tmpArr[to] = tmpArr[from];\n tmpArr[from] = tmpVal;\n this.value = [...tmpArr];\n };\n\n private onMultiInput = (ev) => {\n this.inputSearchVal = ev.target.value.trim();\n this.nanoSearchChange.emit({ value: ev.target.value.trim() });\n };\n\n /* Stencil Component lifecycle hooks */\n\n connectedCallback() {\n this.debounceChanged();\n\n if (!Build.isBrowser) return;\n\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n\n disconnectedCallback() {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n\n if (!Build.isBrowser) return;\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.customValidate();\n this.setDataListOpts();\n raf(() => (this.onInit = false));\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const labelId = this.selectId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot\n ? this.selectId + '-moreId'\n : '';\n const helperEndId = this.hasHelperEndSlot ? this.selectId + '-helper' : '';\n\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n this.valueItems = [];\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: !!this.value.length || !!this.inputSearchVal.length,\n controlId: this.selectId,\n };\n\n const controlOptions = (({ readonly, disabled }) => ({\n readonly,\n disabled,\n clearControl: this.clearSelect,\n }))(this);\n\n return (\n <Host\n type={this.multiple ? 'select-multiple' : 'select-one'}\n aria-disabled={this.disabled ? 'true' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': !!this.value.length || !!this.inputSearchVal.length,\n 'has-focus': this.hasFocus,\n 'is-invalid': this.invalid,\n 'has-label': this.label !== null && !this.floatLabel,\n 'has-float-label': this.label !== null && this.floatLabel,\n rtl: this.rtl,\n 'has-multiple': this.multiple,\n 'has-clr-btn': this.clearSelect,\n masked: this.mask,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearSelectValue}\n control={this.el}\n ref={(el) => (this.selectWrap = el)}\n endValueSlot={\n <slot name=\"down-arrow\">\n <nano-icon slot=\"value-end\" name=\"light/chevron-down\" />\n </slot>\n }\n >\n {this.multiple && (\n <div class=\"select__multi-wrap select\">\n {this.multipleValues(labelId, moreId, helperEndId)}\n </div>\n )}\n {!this.multiple && [\n this.mask && (\n <div class=\"select__mask\">\n {this.getLabel(this.value as string)}\n </div>\n ),\n <input\n id={this.selectId}\n class=\"select__native-input\"\n ref={(input) => (this.inputCtrl = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n placeholder={this.placeholder}\n readOnly={true}\n required={this.required}\n value={this.getLabel(this.value as string)}\n onFocus={this.onFocus}\n />,\n ]}\n </FormControl>\n </FormControlWrap>\n {!this.readonly && !this.disabled && (\n <nano-datalist\n onNanoOptionsUpdated={this.setOptions}\n ref={(el) => (this.datalist = el)}\n selected={this.valArray}\n type={this.multiple ? 'selctMulti' : 'select'}\n onNanoSelect={this.setValue}\n onNanoDeselect={(e) => {\n e.preventDefault();\n this.removeValue(e.detail.value);\n }}\n options={this._options.length ? this._options : undefined}\n >\n {this.allowCustomValues && this.multiple && !!this.inputSearchVal && (\n <nano-option\n slot=\"list-top\"\n value={this.inputSearchVal}\n selected={false}\n label={this.inputSearchVal}\n onNanoSelect={() => this.inputCtrl.focus()}\n >\n <span slot=\"check-icon\"></span>\n Add '{this.inputSearchVal}'\n </nano-option>\n )}\n <slot />\n </nano-datalist>\n )}\n\n <select\n id={this.selectId + '-hidden'}\n class=\"select__native-ctrl\"\n ref={(select) => (this.nativeSelect = select)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n multiple={this.multiple}\n name={this.name}\n required={this.required}\n onInvalid={this.handleInvalid}\n >\n {this.allowCustomValues &&\n this.valArray.map((val) => {\n return (\n <option value={val} selected={true}>\n {val}\n </option>\n );\n })}\n {!this.allowCustomValues &&\n this.options.map((opt: OptionInterface) => {\n return (\n <option\n value={opt.value}\n selected={this.valArray.includes(opt.value)}\n disabled={opt.disabled}\n label={opt.label}\n >\n {this.valArray.includes(opt.value)}\n </option>\n );\n })}\n </select>\n </Host>\n );\n }\n\n private multipleValues(\n labelId: string,\n moreId: string,\n helperEndId: string\n ): VNode | (VNode | VNode[])[] {\n let input: VNode = (\n <input\n class=\"select__multi-input\"\n id={this.selectId}\n ref={(input) => (this.inputCtrl = input)}\n readOnly={this.readonly}\n disabled={this.disabled}\n autoFocus={this.autofocus}\n autocomplete=\"off\"\n onKeyDown={this.handleDocumentKeyDown}\n onInput={this.onMultiInput}\n value={this.inputSearchVal}\n onTouchStart={this.onClick}\n onMouseDown={this.onClick}\n onFocus={this.onFocus}\n placeholder={\n this.placeholder && !this.value.length ? this.placeholder : ''\n }\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n />\n );\n if (!this.value.length) return input;\n\n return (this.value as Array<string>).map((val, i) => {\n let toReturn: VNode | VNode[] = (\n <span\n onDragStart={this.onDragStart}\n onDragLeave={this.onDragLeave}\n onDragEnd={this.onDragEnd}\n onDragOver={(e) => e.preventDefault()}\n draggable\n data-value={val}\n ref={(span) => this.valueItems.push(span)}\n class=\"select__multi-value\"\n >\n <span>{this.getLabel(val)}</span>\n <button\n class=\"select__multi-value-remove\"\n type=\"button\"\n tabindex=\"-1\"\n onTouchEnd={() => {\n this.removeValue(val);\n }}\n onMouseUp={() => {\n this.removeValue(val);\n }}\n >\n <nano-icon name=\"light/times\"></nano-icon>\n </button>\n </span>\n );\n if (i === 0 && this.currInsertIndex < 0)\n toReturn = [input, toReturn as VNode];\n else if (i === this.currInsertIndex)\n toReturn = [toReturn as VNode, input];\n return toReturn;\n });\n }\n}\n"]}
|
@@ -452,7 +452,7 @@ export class Slides {
|
|
452
452
|
"references": {
|
453
453
|
"FlickityOptions": {
|
454
454
|
"location": "import",
|
455
|
-
"path": "/builds/
|
455
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
456
456
|
}
|
457
457
|
}
|
458
458
|
},
|
@@ -555,7 +555,7 @@ export class Slides {
|
|
555
555
|
"references": {
|
556
556
|
"SlideAnimation": {
|
557
557
|
"location": "import",
|
558
|
-
"path": "/builds/
|
558
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
559
559
|
}
|
560
560
|
}
|
561
561
|
},
|
@@ -746,7 +746,7 @@ export class Slides {
|
|
746
746
|
"references": {
|
747
747
|
"DragEvent": {
|
748
748
|
"location": "import",
|
749
|
-
"path": "/builds/
|
749
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
750
750
|
}
|
751
751
|
}
|
752
752
|
}
|
@@ -766,7 +766,7 @@ export class Slides {
|
|
766
766
|
"references": {
|
767
767
|
"DragEvent": {
|
768
768
|
"location": "import",
|
769
|
-
"path": "/builds/
|
769
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
770
770
|
}
|
771
771
|
}
|
772
772
|
}
|
@@ -786,7 +786,7 @@ export class Slides {
|
|
786
786
|
"references": {
|
787
787
|
"DragEvent": {
|
788
788
|
"location": "import",
|
789
|
-
"path": "/builds/
|
789
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
790
790
|
}
|
791
791
|
}
|
792
792
|
}
|
@@ -806,7 +806,7 @@ export class Slides {
|
|
806
806
|
"references": {
|
807
807
|
"DragEvent": {
|
808
808
|
"location": "import",
|
809
|
-
"path": "/builds/
|
809
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
810
810
|
}
|
811
811
|
}
|
812
812
|
}
|
@@ -1113,7 +1113,7 @@ export class Slides {
|
|
1113
1113
|
},
|
1114
1114
|
"Flickity": {
|
1115
1115
|
"location": "import",
|
1116
|
-
"path": "/builds/
|
1116
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1117
1117
|
}
|
1118
1118
|
},
|
1119
1119
|
"return": "Promise<Flickity>"
|
@@ -504,7 +504,7 @@ export class TabGroup {
|
|
504
504
|
"references": {
|
505
505
|
"Color": {
|
506
506
|
"location": "import",
|
507
|
-
"path": "/builds/
|
507
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
508
508
|
}
|
509
509
|
}
|
510
510
|
},
|
@@ -547,7 +547,7 @@ export class TabGroup {
|
|
547
547
|
"references": {
|
548
548
|
"StorageMethods": {
|
549
549
|
"location": "import",
|
550
|
-
"path": "/builds/
|
550
|
+
"path": "/builds/vXyxzadC/0/Digital/nano-components/packages/components/src/utils/store/component-store.ts"
|
551
551
|
}
|
552
552
|
}
|
553
553
|
},
|
@@ -228,9 +228,16 @@ let FieldValidator = class extends HTMLElement {
|
|
228
228
|
// field update has come programmatically (not from ui),
|
229
229
|
// so let's update the underlying ui field
|
230
230
|
if (found &&
|
231
|
+
(found.tagName === 'NANO-CHECKBOX' ||
|
232
|
+
['radio', 'checkbox'].includes(found.type))) {
|
233
|
+
// it's a cb - always change
|
234
|
+
this.storeToFields([found]);
|
235
|
+
}
|
236
|
+
else if (found &&
|
231
237
|
((found.tagName === 'NANO-FILE-UPLOAD' &&
|
232
238
|
!this.fileStateEqual(key, found)) ||
|
233
239
|
(found.tagName !== 'NANO-FILE-UPLOAD' && found.value !== newVal))) {
|
240
|
+
// not a cb. Only change if value is different
|
234
241
|
this.storeToFields([found]);
|
235
242
|
}
|
236
243
|
if (this.validateOn === 'dirty' && this.dirty) {
|
@@ -440,9 +447,7 @@ let FieldValidator = class extends HTMLElement {
|
|
440
447
|
*/
|
441
448
|
async setStore(state) {
|
442
449
|
Object.entries(state).forEach(([key, val]) => {
|
443
|
-
|
444
|
-
if (found)
|
445
|
-
this.store.state[key] = val;
|
450
|
+
this.store.state[key] = val;
|
446
451
|
});
|
447
452
|
}
|
448
453
|
/**
|
@@ -516,29 +521,35 @@ let FieldValidator = class extends HTMLElement {
|
|
516
521
|
return;
|
517
522
|
if (field.tagName === 'NANO-CHECKBOX' ||
|
518
523
|
['radio', 'checkbox'].includes(field.type)) {
|
519
|
-
let
|
520
|
-
if (
|
521
|
-
|
522
|
-
|
524
|
+
let cbs = this.allFields.filter((f) => this.getName(field) === this.getName(f));
|
525
|
+
if (cbs[0].type === 'radio' ||
|
526
|
+
cbs[0].type === 'segment' ||
|
527
|
+
cbs[0].type === 'segment-pill') {
|
523
528
|
// single radio type control
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
529
|
+
cbs.forEach((cb) => {
|
530
|
+
if (this._store.state[fieldName] === cb.value)
|
531
|
+
cb.checked = true;
|
532
|
+
else
|
533
|
+
cb.checked = false;
|
534
|
+
});
|
528
535
|
}
|
529
536
|
else if (Array.isArray(this._store.state[fieldName])) {
|
530
537
|
// multiple checkbox like controls
|
531
|
-
|
532
|
-
cb.
|
533
|
-
|
534
|
-
|
538
|
+
cbs.forEach((cb) => {
|
539
|
+
if (this._store.state[fieldName].includes(cb.value))
|
540
|
+
cb.checked = true;
|
541
|
+
else
|
542
|
+
cb.checked = false;
|
543
|
+
});
|
535
544
|
}
|
536
545
|
else {
|
537
546
|
// single checkbox like control
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
547
|
+
cbs.forEach((cb) => {
|
548
|
+
if (this._store.state[fieldName] === cb.value)
|
549
|
+
cb.checked = true;
|
550
|
+
else
|
551
|
+
cb.checked = false;
|
552
|
+
});
|
542
553
|
}
|
543
554
|
return;
|
544
555
|
}
|