e25d03d8f4
* managed: add base manager and Ops * core: use ManagedModel for Token and PropertyMapping * providers/saml: implement managed objects for SAML Provider * sources/ldap: migrate to managed * providers/oauth2: migrate to managed * providers/proxy: migrate to managed * *: load .managed in apps * managed: add reconcile task, run on startup * providers/oauth2: fix import path for managed * providers/saml: don't set FriendlyName when mapping is none * *: use ObjectManager in tests to ensure objects exist * ci: use vmImage ubuntu-latest * providers/saml: add new mapping for username and user id * tests: remove docker proxy * tests/e2e: use updated attribute names * docs: update SAML docs * tests/e2e: fix remaining saml cases * outposts: make tokens as managed * *: make PropertyMapping SerializerModel * web: add page for property-mappings * web: add codemirror to common_styles because codemirror * docs: fix member-of in nextcloud * docs: nextcloud add admin * web: fix refresh reloading data two times * web: add loading lock to table to prevent double loads * web: add ability to use null in QueryArgs (value will be skipped) * web: add hide option to property mappings * web: fix linting
42 lines
1.7 KiB
TypeScript
42 lines
1.7 KiB
TypeScript
import { CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element";
|
|
import { ifDefined } from "lit-html/directives/if-defined";
|
|
import { COMMON_STYLES } from "../../common/styles";
|
|
|
|
@customElement("ak-table-search")
|
|
export class TableSearch extends LitElement {
|
|
|
|
@property()
|
|
value?: string;
|
|
|
|
@property()
|
|
onSearch?: (value: string) => void;
|
|
|
|
static get styles(): CSSResult[] {
|
|
return COMMON_STYLES;
|
|
}
|
|
|
|
render(): TemplateResult {
|
|
return html`<div class="pf-c-toolbar__group pf-m-filter-group">
|
|
<div class="pf-c-toolbar__item pf-m-search-filter">
|
|
<form class="pf-c-input-group" method="GET" @submit=${(e: Event) => {
|
|
e.preventDefault();
|
|
if (!this.onSearch) return;
|
|
const el = this.shadowRoot?.querySelector<HTMLInputElement>("input[type=search]");
|
|
if (!el) return;
|
|
if (el.value === "") return;
|
|
this.onSearch(el?.value);
|
|
}}>
|
|
<input class="pf-c-form-control" name="search" type="search" placeholder="Search..." value="${ifDefined(this.value)}" @search=${(ev: Event) => {
|
|
if (!this.onSearch) return;
|
|
this.onSearch((ev.target as HTMLInputElement).value);
|
|
}}>
|
|
<button class="pf-c-button pf-m-control" type="submit">
|
|
<i class="fas fa-search" aria-hidden="true"></i>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>`;
|
|
}
|
|
|
|
}
|