@things-factory/auth-ui 9.0.0-beta.0 → 9.0.0-beta.4
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-client/components/invite-user.js +0 -1
- package/dist-client/components/invite-user.js.map +1 -1
- package/dist-client/entries/public/home.js +2 -2
- package/dist-client/entries/public/home.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -13,7 +13,6 @@ let InviteUser = class InviteUser extends localize(i18next)(LitElement) {
|
|
|
13
13
|
name="username"
|
|
14
14
|
type="text"
|
|
15
15
|
required
|
|
16
|
-
name="username"
|
|
17
16
|
autocapitalize="off"
|
|
18
17
|
placeholder=${String(i18next.t('text.user invitation prompt'))}
|
|
19
18
|
pattern="^(?:[A-Za-z0-9]*|[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,})$"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invite-user.js","sourceRoot":"","sources":["../../client/components/invite-user.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAE3B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAGtD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAyBpD,MAAM;QACJ,OAAO,IAAI,CAAA
|
|
1
|
+
{"version":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;;;;;;;;;;;;;;;;;;;;GAoBlB,AApBY,CAoBZ;AAE8B;IAA9B,KAAK,CAAC,sBAAsB,CAAC;8BAAe,gBAAgB;+CAAA;AAvBzD,UAAU;IADf,aAAa,CAAC,aAAa,CAAC;GACvB,UAAU,CA2Ff","sourcesContent":["import './user-role-editor'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, query } from 'lit/decorators.js'\n\nimport { client, gqlContext } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\n\n@customElement('invite-user')\nclass InviteUser extends localize(i18next)(LitElement) {\n static styles = css`\n :host {\n display: grid;\n }\n\n input {\n flex: 1;\n\n border: var(--border-dim-color);\n border-radius: var(--border-radius);\n margin: var(--input-margin);\n padding: var(--input-padding);\n min-width: 250px;\n font: var(--input-font);\n }\n\n md-outlined-button {\n margin: var(--input-margin);\n text-transform: capitalize;\n }\n `\n\n @query('input[name=username]') userIdInput!: HTMLInputElement\n\n render() {\n return html`\n <input\n name=\"username\"\n type=\"text\"\n required\n autocapitalize=\"off\"\n placeholder=${String(i18next.t('text.user invitation prompt'))}\n pattern=\"^(?:[A-Za-z0-9]*|[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,})$\"\n />\n <md-outlined-button @click=${this.invite.bind(this)}>\n <md-icon slot=\"icon\">group_add</md-icon>${String(i18next.t('label.invite user'))}\n </md-outlined-button>\n `\n }\n\n async invite() {\n try {\n if (!this.userIdInput.checkValidity()) {\n throw new Error(i18next.t('error.not valid pattern of type', { type: 'user-id or email' }))\n }\n\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.do_you_want_to_invite_x', { x: i18next.t(`label.user`) }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n await this.inviteUser(this.userIdInput.value)\n\n this.dispatchEvent(new CustomEvent('invitationCompleted'))\n }\n } catch (e: any) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'error',\n message: 'message' in e ? e.message : e\n }\n })\n )\n }\n }\n\n async inviteUser(username) {\n const response = await client.mutate({\n mutation: gql`\n mutation inviteUser($username: String!) {\n inviteUser(username: $username)\n }\n `,\n variables: { username },\n context: gqlContext()\n })\n\n if (!response.errors) {\n await OxPrompt.open({\n title: i18next.t('text.completed'),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n\n this.userIdInput.value = ''\n }\n }\n}\n"]}
|
|
@@ -35,7 +35,7 @@ let HomePage = class HomePage extends localize(i18next)(LitElement) {
|
|
|
35
35
|
<form action="/auth/join" accept-charset="utf-8" name="join" method="post">
|
|
36
36
|
<fieldset>
|
|
37
37
|
<legend>${title} invitation ticket</legend>
|
|
38
|
-
<input type="
|
|
38
|
+
<input type="email" name="email" placeholder="Enter your email address" />
|
|
39
39
|
<input type="submit" value="join now" />
|
|
40
40
|
</fieldset>
|
|
41
41
|
</form>
|
|
@@ -239,7 +239,7 @@ __decorate([
|
|
|
239
239
|
__metadata("design:type", String)
|
|
240
240
|
], HomePage.prototype, "explanation2", void 0);
|
|
241
241
|
__decorate([
|
|
242
|
-
query('input[type=
|
|
242
|
+
query('input[type=email]'),
|
|
243
243
|
__metadata("design:type", HTMLInputElement)
|
|
244
244
|
], HomePage.prototype, "firstInput", void 0);
|
|
245
245
|
HomePage = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"home.js","sourceRoot":"","sources":["../../../client/entries/public/home.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qCAAqC,CAAA;AAC5C,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,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G;gBACtB,IAAI,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI;gBACpB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB;gBACvD,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB;aAChF,CAAA;QACH,CAAC;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC9B,CAAC;;AAxOM,eAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiKF;CACF,AAnKY,CAmKZ;AAE4C;IAA5C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yCAAiB;AAChB;IAA5C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;8CAAsB;AACrB;IAA5C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;8CAAsB;AA2CtC;IAA3B,KAAK,CAAC,mBAAmB,CAAC;8BAAc,gBAAgB;4CAAA;AAnN9C,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CA0OpB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/text-button.js'\nimport '@material/web/button/elevated-button.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { i18next, localize } from '@operato/i18n'\n\n@customElement('home-page')\nexport class HomePage extends localize(i18next)(LitElement) {\n static styles = [\n css`\n :host {\n display: block;\n position: relative;\n }\n\n .signin {\n position: absolute;\n right: 20px;\n top: 10px;\n display: inline-block;\n padding: 12px 24px;\n font-size: 16px;\n font-weight: bold;\n color: var(--md-sys-color-on-tertiary-container);\n background-color: var(--md-sys-color-tertiary-container);\n border: none;\n border-radius: 4px;\n text-align: center;\n text-decoration: none;\n transition:\n background-color 0.3s,\n transform 0.3s;\n }\n\n .signin:hover {\n color: var(--md-sys-color-tertiary-container);\n background-color: var(--md-sys-color-on-tertiary-container);\n transform: translateY(-2px);\n }\n\n .signin:active {\n color: var(--md-sys-color-on-tertiary-container);\n background-color: var(--md-sys-color-tertiary-container);\n transform: translateY(0);\n }\n\n [message] {\n background-color: var(--md-sys-color-secondary-container);\n padding: 60px 50px 0 50px;\n color: var(--md-sys-color-on-secondary-container);\n text-align: center;\n font-size: 20px;\n }\n\n [message] strong {\n display: block;\n font-size: 2.5rem;\n }\n\n [message] img {\n width: 800px;\n max-width: 90%;\n display: block;\n margin: auto;\n margin-top: -15px;\n }\n\n [ticket] {\n display: grid;\n grid-template-columns: 96px 1fr;\n width: 450px;\n margin: auto;\n margin-top: -20px;\n margin-bottom: 60px;\n }\n\n [brand] {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 12px;\n overflow: hidden;\n background-color: var(--md-sys-color-primary);\n box-shadow: var(--box-shadow);\n border-right: 3px dotted var(--md-sys-color-secondary-container);\n text-align: center;\n }\n\n [ticket] [content] {\n border-radius: 12px;\n background-color: var(--md-sys-color-tertiary-container);\n padding: var(--spacing-medium) var(--spacing-large);\n box-shadow: var(--box-shadow);\n }\n\n fieldset {\n border: none;\n margin: 0;\n padding: 0;\n }\n\n legend {\n margin: 0;\n padding: var(--spacing-small) 0 var(--spacing-medium) 0;\n font-weight: bold;\n color: var(--legend-color);\n text-transform: uppercase;\n }\n\n input {\n border: var(--md-sys-color-outline);\n border-radius: var(--border-radius);\n padding: var(--spacing-medium);\n font: var(--input-font);\n }\n\n input[type='text'] {\n min-width: 190px;\n }\n\n input:focus {\n outline: none;\n }\n\n @media screen and (max-width: 480px) {\n [message] {\n padding: 60px 10px 0 10px;\n text-align: center;\n font-size: 14px;\n }\n [message] strong {\n margin-bottom: 15px;\n font-size: 1.6rem;\n line-height: 1.2em;\n }\n [message] img {\n max-width: 100%;\n }\n\n legend {\n padding: 0;\n }\n\n [ticket] {\n display: grid;\n grid-template-columns: 0 1fr;\n width: 90%;\n margin: auto;\n margin-top: -15px;\n margin-bottom: 60px;\n }\n [brand] {\n border: 0;\n }\n [content] {\n border: 1px solid var(--md-sys-color-primary);\n }\n\n fieldset {\n text-align: center;\n }\n input[type='text'] {\n width: calc(100% - 20px);\n margin: var(--spacing-small) 0 var(--spacing-medium) 0;\n text-align: center;\n }\n fieldset md-text-button {\n width: 100%;\n }\n }\n `\n ]\n\n @property({ type: String, attribute: true }) tagline?: string\n @property({ type: String, attribute: true }) explanation1?: string\n @property({ type: String, attribute: true }) explanation2?: string\n\n private _applicationMeta?: { icon?: string; title?: string; description?: string }\n\n render() {\n var { icon, title } = this.applicationMeta\n\n const tagline = this.tagline || `Join the ${title} Business Program`\n const explanation1 = this.explanation1 || 'Create your free account today.'\n const explanation2 = this.explanation2 || 'Everything you need to go from where you are, to where you want to be.'\n\n return html`\n <a\n class=\"signin\"\n @click=${e => {\n e.preventDefault()\n window.location.href = '/auth/signin'\n }}\n >\n ${i18next.t('button.sign_in')}</a\n >\n\n <div message>\n <strong>${tagline}</strong> ${explanation1} <br />\n ${explanation2}\n <img src=\"/assets/images/invitation.png\" />\n </div>\n\n <div ticket>\n <div brand><img src=${ifDefined(icon)} /></div>\n <div content>\n <form action=\"/auth/join\" accept-charset=\"utf-8\" name=\"join\" method=\"post\">\n <fieldset>\n <legend>${title} invitation ticket</legend>\n <input type=\"email\" name=\"email\" placeholder=\"Enter your email address\" />\n <input type=\"submit\" value=\"join now\" />\n </fieldset>\n </form>\n </div>\n </div>\n `\n }\n\n @query('input[type=email]') firstInput!: HTMLInputElement\n\n firstUpdated() {\n setTimeout(() => {\n this.firstInput.focus()\n }, 100)\n }\n\n get applicationMeta() {\n if (!this._applicationMeta) {\n var iconLink: HTMLLinkElement | null = document.querySelector('link[rel=\"application-icon\"]')\n var titleMeta: HTMLMetaElement | null = document.querySelector('meta[name=\"application-name\"]')\n var descriptionMeta: HTMLMetaElement | null = document.querySelector('meta[name=\"application-description\"]')\n\n this._applicationMeta = {\n icon: iconLink?.href,\n title: titleMeta ? titleMeta.content : 'Things Factory',\n description: descriptionMeta ? descriptionMeta.content : 'Reimagining Software'\n }\n }\n\n return this._applicationMeta\n }\n}\n"]}
|