Remove with Text

Remove GetEngineeringSpcReview
Better error message
EnforceCodeStyleInBuild
NginxFileSystem
Remove Reactors and Working Directory
AppSettings
Delete self contained Thunder Tests
Back to .net8.0
api/v4/InfinityQS
ApiExplorerSettings
Wafer Counter
This commit is contained in:
2024-04-15 13:13:55 -07:00
parent 7e16ee7f98
commit 5c9f0d1aff
974 changed files with 205399 additions and 1385 deletions

View File

@ -0,0 +1,73 @@
:root {
--ifx-font-family: "Source Sans 3";
font-family: var(--ifx-font-family, sans-serif);
}
:host {
display: flex;
}
.search-field {
box-sizing: border-box;
background-color: #FFFFFF;
width: 100%;
font-family: var(--ifx-font-family);
}
.search-field .search-field__wrapper {
box-sizing: border-box;
height: 40px;
display: flex;
align-items: center;
border: 1px solid #8D8786;
border-radius: 1px;
padding: 8px 16px;
gap: 12px;
flex: none;
order: 0;
align-self: stretch;
flex-grow: 0;
position: relative;
width: 100%;
outline: none;
color: #8D8786;
}
.search-field .search-field__wrapper.focused {
border: 1px solid #0A8276;
}
.search-field .search-field__wrapper.focused ifx-icon {
color: #575352;
}
.search-field .search-field__wrapper.search-field__wrapper-s {
height: 36px;
}
.search-field .search-field__wrapper:hover:not(.focused, :focus) {
border: 1px solid #3C3A39;
}
.search-field .search-field__wrapper:focus {
outline: none;
border: 1px solid #0A8276;
}
.search-field .search-field__wrapper .delete-icon {
right: 12px;
cursor: pointer;
}
.search-field .search-field__wrapper input[type=text] {
font-style: normal;
font-weight: 400;
font-size: 16px;
color: #8D8786;
border: none;
width: 100%;
outline: none;
height: 16px;
}
.search-field .search-field__wrapper input[type=text]:focus {
outline: none;
color: #1d1d1d;
}
.search-field .search-field__wrapper input[type=text]:disabled {
background-color: #EEEDED;
}
.search-field .search-field__wrapper:has(input[disabled]) {
background-color: #EEEDED;
}

View File

@ -0,0 +1,60 @@
import { newE2EPage } from "@stencil/core/testing";
describe('SearchField', () => {
it('should render', async () => {
const page = await newE2EPage();
await page.setContent('<ifx-search-field></ifx-search-field>');
const searchInput = await page.find('ifx-search-field');
expect(searchInput).toHaveClass('hydrated');
const wrapper = await page.find('ifx-search-field >>> .search-field__wrapper');
expect(wrapper).toHaveClass('search-field__wrapper');
const input = await page.find('ifx-search-field >>> input');
expect(await input.getProperty('placeholder')).toBe('Search...');
expect(await input.getProperty('disabled')).toBeFalsy();
expect(await input.getProperty('value')).toBe('');
const deleteIcon = await page.find('ifx-search-field >>> .delete-icon');
expect(deleteIcon).toBeNull();
});
it('should update value on input', async () => {
const page = await newE2EPage();
await page.setContent('<ifx-search-field></ifx-search-field>');
const input = await page.find('ifx-search-field >>> input');
await input.press('KeyA');
await input.press('KeyB');
expect(await input.getProperty('value')).toBe('ab');
});
it('should emit ifxInput event on input change', async () => {
const page = await newE2EPage();
await page.setContent('<ifx-search-field></ifx-search-field>');
const input = await page.find('ifx-search-field >>> input');
await input.press('KeyA');
});
it('should clear input on delete icon click', async () => {
const page = await newE2EPage();
await page.setContent('<ifx-search-field show-delete-icon value="Search text"></ifx-search-field>');
const searchField = await page.find('ifx-search-field');
const deleteIcon = await searchField.find('.delete-icon');
const input = await searchField.find('input');
const eventSpy = await page.spyOnEvent('ifxInput');
if (deleteIcon) {
await deleteIcon.click();
}
if (!input) {
console.error('Input not found!');
return; // Exit the test early.
}
expect(await input.getProperty('value')).toBe('');
expect(eventSpy).toHaveReceivedEventDetail(null);
});
it('should set focus on input click', async () => {
const page = await newE2EPage();
await page.setContent('<ifx-search-field></ifx-search-field>');
const input = await page.find('ifx-search-field >>> input');
const wrapper = await page.find('ifx-search-field >>> .search-field__wrapper');
await wrapper.click();
expect(await input.getProperty('value')).toBe('');
expect(await input.getProperty('disabled')).toBeFalsy();
expect(await input.getProperty('placeholder')).toBe('Search...');
expect(await wrapper.getProperty('className')).toContain('focused');
});
});
//# sourceMappingURL=search-field.e2e.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,190 @@
import { h } from "@stencil/core";
import classNames from "classnames";
export class SearchField {
constructor() {
this.handleInput = () => {
const query = this.inputElement.value;
this.value = query; // update the value property when input changes
this.ifxInput.emit(this.value);
};
this.handleDelete = () => {
this.inputElement.value = '';
this.value = "";
this.ifxInput.emit(null);
};
this.value = '';
this.insideDropdown = false;
this.showDeleteIcon = false;
this.showDeleteIconInternalState = false;
this.disabled = false;
this.size = 'l';
this.isFocused = false;
}
handleOutsideClick(event) {
const path = event.composedPath();
if (!path.includes(this.inputElement)) {
this.isFocused = false;
}
}
valueWatcher(newValue) {
if (newValue !== this.inputElement.value) {
this.inputElement.value = newValue;
}
}
focusInput() {
this.inputElement.focus();
this.isFocused = true;
}
componentWillUpdate() {
if (this.value !== "") {
this.showDeleteIconInternalState = true;
}
else
this.showDeleteIconInternalState = false;
}
render() {
return (h("div", { "aria-label": "a search field for user input", "aria-disabled": this.disabled, "aria-value": this.value, class: 'search-field' }, h("div", { class: this.getWrapperClassNames(), tabindex: 1, onFocus: () => this.focusInput(), onClick: () => this.focusInput() }, h("ifx-icon", { icon: "search-16", class: "search-icon" }), h("input", { ref: (el) => (this.inputElement = el), type: "text", onInput: () => this.handleInput(), placeholder: "Search...", disabled: this.disabled, value: this.value }), this.showDeleteIcon && this.showDeleteIconInternalState ? (h("ifx-icon", { icon: "cremove16", class: "delete-icon", onClick: this.handleDelete })) : null)));
}
getSizeClass() {
return `${this.size}` === "s"
? "search-field__wrapper-s"
: "";
}
getWrapperClassNames() {
return classNames(`search-field__wrapper`, `search-field__wrapper ${this.getSizeClass()}`, `${this.isFocused ? 'focused' : ""}`);
}
static get is() { return "ifx-search-field"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"$": ["search-field.scss"]
};
}
static get styleUrls() {
return {
"$": ["search-field.css"]
};
}
static get properties() {
return {
"value": {
"type": "string",
"mutable": true,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "value",
"reflect": false,
"defaultValue": "''"
},
"showDeleteIcon": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "show-delete-icon",
"reflect": false,
"defaultValue": "false"
},
"disabled": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "disabled",
"reflect": false,
"defaultValue": "false"
},
"size": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "size",
"reflect": false,
"defaultValue": "'l'"
}
};
}
static get states() {
return {
"insideDropdown": {},
"showDeleteIconInternalState": {},
"isFocused": {}
};
}
static get events() {
return [{
"method": "ifxInput",
"name": "ifxInput",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "String",
"resolved": "String",
"references": {
"String": {
"location": "global",
"id": "global::String"
}
}
}
}];
}
static get watchers() {
return [{
"propName": "value",
"methodName": "valueWatcher"
}];
}
static get listeners() {
return [{
"name": "mousedown",
"method": "handleOutsideClick",
"target": "document",
"capture": false,
"passive": true
}];
}
}
//# sourceMappingURL=search-field.js.map

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,37 @@
import { action } from "@storybook/addon-actions";
export default {
title: 'Components/Search Field',
// tags: ['autodocs'],
args: {
showDeleteIcon: true,
disabled: false,
size: "m",
},
argTypes: {
size: {
description: "Size options: s (36px) and m (40px) - default: m",
options: ['s', 'm'],
control: { type: 'radio' },
},
ifxInput: {
action: 'ifxInput',
description: 'Custom event',
table: {
type: {
summary: 'Framework integration',
detail: 'React: onIfxInput={handleInput}\nVue:@ifxInput="handleInput"\nAngular:(ifxInput)="handleInput()"\nVanillaJs:.addEventListener("ifxInput", (event) => {//handle input});',
},
},
},
},
};
const DefaultTemplate = ({ disabled, size, showDeleteIcon }) => {
const element = document.createElement('ifx-search-field');
element.setAttribute('size', size);
element.setAttribute('disabled', disabled);
element.setAttribute('show-delete-icon', showDeleteIcon);
element.addEventListener('ifxInput', action('ifxInput'));
return element;
};
export const Default = DefaultTemplate.bind({});
//# sourceMappingURL=search-field.stories.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"search-field.stories.js","sourceRoot":"","sources":["../../../src/components/search-field/search-field.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,eAAe;EACb,KAAK,EAAE,yBAAyB;EAChC,sBAAsB;EAEtB,IAAI,EAAE;IACJ,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,KAAK;IACf,IAAI,EAAE,GAAG;GAEV;EACD,QAAQ,EAAE;IACR,IAAI,EAAE;MACJ,WAAW,EAAE,kDAAkD;MAC/D,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;MACnB,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;KAC3B;IACD,QAAQ,EAAE;MACR,MAAM,EAAE,UAAU;MAClB,WAAW,EAAE,cAAc;MAC3B,KAAK,EAAE;QACL,IAAI,EAAE;UACJ,OAAO,EAAE,uBAAuB;UAChC,MAAM,EAAE,yKAAyK;SAClL;OACF;KACF;GAEF;CACF,CAAC;AAGF,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,EAAE;EAC7D,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;EAC3D,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;EACnC,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;EAC3C,OAAO,CAAC,YAAY,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;EACzD,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;EAEzD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAIF,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { action } from \"@storybook/addon-actions\";\n\nexport default {\n title: 'Components/Search Field',\n // tags: ['autodocs'],\n\n args: {\n showDeleteIcon: true,\n disabled: false,\n size: \"m\",\n\n },\n argTypes: {\n size: {\n description: \"Size options: s (36px) and m (40px) - default: m\",\n options: ['s', 'm'],\n control: { type: 'radio' },\n },\n ifxInput: {\n action: 'ifxInput',\n description: 'Custom event',\n table: {\n type: {\n summary: 'Framework integration',\n detail: 'React: onIfxInput={handleInput}\\nVue:@ifxInput=\"handleInput\"\\nAngular:(ifxInput)=\"handleInput()\"\\nVanillaJs:.addEventListener(\"ifxInput\", (event) => {//handle input});',\n },\n },\n },\n\n },\n};\n\n\nconst DefaultTemplate = ({ disabled, size, showDeleteIcon }) => {\n const element = document.createElement('ifx-search-field');\n element.setAttribute('size', size);\n element.setAttribute('disabled', disabled);\n element.setAttribute('show-delete-icon', showDeleteIcon);\n element.addEventListener('ifxInput', action('ifxInput'));\n\n return element;\n};\n\n\n\nexport const Default = DefaultTemplate.bind({});"]}