@things-factory/auth-ui 7.0.1-beta.8 → 7.0.1-rc.0

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.
Files changed (91) hide show
  1. package/client/components/delete-user-popup.ts +1 -1
  2. package/client/components/domain-switch.ts +5 -5
  3. package/client/components/profile-component.ts +1 -0
  4. package/client/components/user-role-editor.ts +7 -3
  5. package/client/entries/auth/checkin.ts +1 -2
  6. package/client/pages/application/applications.ts +1 -1
  7. package/client/themes/auth-theme.css +2 -2
  8. package/dist-client/components/abstract-auth-page.d.ts +3 -3
  9. package/dist-client/components/abstract-auth-page.js.map +1 -1
  10. package/dist-client/components/abstract-password-reset.d.ts +1 -1
  11. package/dist-client/components/abstract-password-reset.js.map +1 -1
  12. package/dist-client/components/abstract-sign.d.ts +1 -1
  13. package/dist-client/components/abstract-sign.js.map +1 -1
  14. package/dist-client/components/change-password.d.ts +1 -1
  15. package/dist-client/components/change-password.js.map +1 -1
  16. package/dist-client/components/contact-us.d.ts +1 -1
  17. package/dist-client/components/contact-us.js.map +1 -1
  18. package/dist-client/components/create-domain-popup.js.map +1 -1
  19. package/dist-client/components/create-role.js.map +1 -1
  20. package/dist-client/components/create-user.js.map +1 -1
  21. package/dist-client/components/credential-manager.d.ts +1 -1
  22. package/dist-client/components/credential-manager.js.map +1 -1
  23. package/dist-client/components/delete-user-popup.d.ts +1 -1
  24. package/dist-client/components/delete-user-popup.js +1 -1
  25. package/dist-client/components/delete-user-popup.js.map +1 -1
  26. package/dist-client/components/domain-switch.d.ts +1 -1
  27. package/dist-client/components/domain-switch.js +5 -5
  28. package/dist-client/components/domain-switch.js.map +1 -1
  29. package/dist-client/components/invite-customer.js.map +1 -1
  30. package/dist-client/components/invite-user.js.map +1 -1
  31. package/dist-client/components/my-login-history.js.map +1 -1
  32. package/dist-client/components/ownership-transfer-popup.js.map +1 -1
  33. package/dist-client/components/partner-info-card.d.ts +1 -1
  34. package/dist-client/components/partner-info-card.js.map +1 -1
  35. package/dist-client/components/partner-role-editor.js.map +1 -1
  36. package/dist-client/components/profile-component.d.ts +1 -1
  37. package/dist-client/components/profile-component.js +1 -0
  38. package/dist-client/components/profile-component.js.map +1 -1
  39. package/dist-client/components/role-edit-form.js.map +1 -1
  40. package/dist-client/components/role-privilege-editor.js.map +1 -1
  41. package/dist-client/components/role-selector.d.ts +1 -1
  42. package/dist-client/components/role-selector.js.map +1 -1
  43. package/dist-client/components/user-role-editor.js +7 -3
  44. package/dist-client/components/user-role-editor.js.map +1 -1
  45. package/dist-client/entries/auth/activate.d.ts +4 -4
  46. package/dist-client/entries/auth/activate.js.map +1 -1
  47. package/dist-client/entries/auth/checkin.d.ts +4 -4
  48. package/dist-client/entries/auth/checkin.js +1 -2
  49. package/dist-client/entries/auth/checkin.js.map +1 -1
  50. package/dist-client/entries/auth/forgot-password.d.ts +2 -2
  51. package/dist-client/entries/auth/forgot-password.js.map +1 -1
  52. package/dist-client/entries/auth/reset-password.js.map +1 -1
  53. package/dist-client/entries/auth/result.d.ts +4 -4
  54. package/dist-client/entries/auth/result.js.map +1 -1
  55. package/dist-client/entries/auth/signin.js.map +1 -1
  56. package/dist-client/entries/auth/signup.d.ts +2 -2
  57. package/dist-client/entries/auth/signup.js.map +1 -1
  58. package/dist-client/entries/auth/unlock-user.js.map +1 -1
  59. package/dist-client/entries/oauth2/oauth2-decision-error-page.js.map +1 -1
  60. package/dist-client/entries/oauth2/oauth2-decision-page.js.map +1 -1
  61. package/dist-client/entries/public/home.d.ts +4 -4
  62. package/dist-client/entries/public/home.js.map +1 -1
  63. package/dist-client/index.js.map +1 -1
  64. package/dist-client/pages/app-binding/app-binding.js.map +1 -1
  65. package/dist-client/pages/app-binding/app-bindings.js.map +1 -1
  66. package/dist-client/pages/appliance/appliance.js.map +1 -1
  67. package/dist-client/pages/appliance/home.js.map +1 -1
  68. package/dist-client/pages/appliance/register.js.map +1 -1
  69. package/dist-client/pages/application/application.js.map +1 -1
  70. package/dist-client/pages/application/applications.js +1 -1
  71. package/dist-client/pages/application/applications.js.map +1 -1
  72. package/dist-client/pages/application/register.js.map +1 -1
  73. package/dist-client/pages/attribute/attribute-set-item-list.js.map +1 -1
  74. package/dist-client/pages/attribute/attribute-set-management.d.ts +1 -1
  75. package/dist-client/pages/attribute/attribute-set-management.js.map +1 -1
  76. package/dist-client/pages/auth-provider/auth-provider-management.d.ts +1 -1
  77. package/dist-client/pages/auth-provider/auth-provider-management.js.map +1 -1
  78. package/dist-client/pages/domain/domain-management.d.ts +1 -1
  79. package/dist-client/pages/domain/domain-management.js.map +1 -1
  80. package/dist-client/pages/partner/partner-management.js.map +1 -1
  81. package/dist-client/pages/profile.d.ts +1 -1
  82. package/dist-client/pages/profile.js.map +1 -1
  83. package/dist-client/pages/role/role-management.js.map +1 -1
  84. package/dist-client/pages/user/user-management.js.map +1 -1
  85. package/dist-client/route.js.map +1 -1
  86. package/dist-client/themes/auth-theme.css +2 -2
  87. package/dist-client/tsconfig.tsbuildinfo +1 -1
  88. package/dist-client/utils/password-rule.js.map +1 -1
  89. package/dist-server/index.d.ts +0 -0
  90. package/dist-server/tsconfig.tsbuildinfo +1 -1
  91. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"file":"user-role-editor.js","sourceRoot":"","sources":["../../client/components/user-role-editor.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,4BAA4B,CAAA;AACnC,OAAO,iBAAiB,CAAA;AAExB,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,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,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,C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C,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,KAAK,CAAA;IACxE,CAAC;;AAxdM,qBAAM,GAAG;IACd,qBAAqB;IACrB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+DF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CAAe;AAC1C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;gDAA0B;AACtD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDAAiB;AAE5C;IAAC,KAAK,EAAE;;mDAAwB;AAChC;IAAC,KAAK,EAAE;;oDAAuB;AAC/B;IAAC,KAAK,EAAE;;iDAAsB;AAC9B;IAAC,KAAK,EAAE;;oDAA8B;AACtC;IAAC,KAAK,EAAE;;qDAA+B;AA7EnC,cAAc;IADnB,aAAa,CAAC,kBAAkB,CAAC;GAC5B,cAAc,CA0dnB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\n\nimport './ownership-transfer-popup'\nimport './role-selector'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin'\n\nimport { client, gqlContext } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\nimport { store } from '@operato/shell'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\nimport { ButtonContainerStyles } from '@operato/styles'\nimport { RoleSelector } from './role-selector'\n\n@customElement('user-role-editor')\nclass UserRoleEditor extends connect(store)(LitElement) {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n border: 1px solid var(--md-sys-color-primary);\n font: normal 15px var(--theme-font);\n color: var(--md-sys-color-secondary);\n }\n ul {\n flex: 1;\n display: grid;\n grid-template-columns: 1fr 1fr;\n column-gap: 20px;\n\n overflow: auto;\n margin: 0;\n padding: var(--padding-default);\n list-style: none;\n border: 1px dashed rgba(0, 0, 0, 0.1);\n border-width: 1px 0;\n }\n input[readonly] {\n border: none;\n background-color: transparent;\n color: var(--md-sys-color-secondary);\n font: var(--input-font);\n }\n li {\n padding: var(--padding-narrow);\n }\n [detail] {\n background-color: rgba(var(--primary-color-rgb), 0.05);\n }\n [detail] md-icon {\n --md-icon-size: var(--fontsize-default);\n vertical-align: middle;\n color: var(--md-sys-color-primary);\n }\n [detail] li {\n display: flex;\n }\n [detail] li input {\n flex: 1;\n }\n\n md-elevated-button {\n margin: 5px;\n }\n\n [danger] {\n --md-theme-primary: var(--md-danger-button-primary-color);\n }\n\n md-outlined-button {\n background-color: var(--md-sys-color-surface-variant);\n }\n\n @media screen and (max-width: 480px) {\n ul {\n grid-template-columns: 1fr;\n }\n }\n `\n ]\n\n @property({ type: Object }) user: any = {}\n @property({ type: Boolean }) activate: boolean = false\n @property({ type: Object }) domainOwner: any\n\n @state() domainRoles: any[] = []\n @state() grantedRoles: any = {}\n @state() userRoles: any[] = []\n @state() isSuperOwner: boolean = false\n @state() isDomainOwner: boolean = false\n\n private me: any\n\n render() {\n const user = this.user || {}\n const domainRoles = this.domainRoles || []\n const grantedRoles = this.grantedRoles || {}\n let currentDomainName = 'roles'\n if (domainRoles?.length) {\n currentDomainName = domainRoles[0].domain.name\n }\n\n return html`\n ${this.activate\n ? html`\n <ul detail>\n ${user.userType === 'user'\n ? html`\n <li>\n <span>\n <md-icon>email</md-icon>\n ${user.email}\n </span>\n </li>\n `\n : ''}\n </ul>\n\n <role-selector .user=${this.user} .roles=${domainRoles} .userRoles=${this.userRoles}></role-selector>\n\n ${Object.keys(grantedRoles).map(\n partnerName => html`\n <role-selector\n .roleCategory=${partnerName}\n .user=${this.user}\n .roles=${this.grantedRoles[partnerName]}\n .userRoles=${this.userRoles}\n >\n </role-selector>\n `\n )}\n `\n : ''}\n\n <div class=\"button-container\">\n ${this.isRoleEditable()\n ? html` <md-elevated-button\n @click=${() => {\n const { availableRoles, selectedRoles } = Array.from(\n this.renderRoot.querySelectorAll('role-selector') as NodeListOf<RoleSelector>\n ).reduce(\n (roles, roleSelector) => {\n roles.availableRoles = roles.availableRoles.concat(\n roleSelector.roles.map(r => {\n delete r.domain\n return r\n })\n )\n roles.selectedRoles = roles.selectedRoles.concat(\n roleSelector.selectedRoles().map(r => {\n //@ts-ignore\n delete r.domain\n return r\n })\n )\n return roles\n },\n { availableRoles: [], selectedRoles: [] } as { availableRoles: any[]; selectedRoles: any[] }\n )\n this.onSave(user, availableRoles, selectedRoles)\n }}\n >${String(i18next.t('button.save'))}</md-elevated-button\n >`\n : ''}\n ${user.userType === 'user'\n ? html`\n ${this.isTransferable(user)\n ? html`\n <md-elevated-button danger @click=${() => this.onTransfer(user)}\n >${String(i18next.t('button.transfer owner'))}</md-elevated-button\n >\n `\n : ''}\n ${this.isPasswordResettable(user)\n ? html`<md-elevated-button danger @click=${() => this.onResetPassword(user)}\n >${String(i18next.t('title.reset password'))}</md-elevated-button\n >`\n : ''}\n `\n : ''}\n ${this.isRemovable(user)\n ? html`\n <md-elevated-button danger @click=${() => this.onDelete(user)}\n >${String(i18next.t('button.delete user'))}</md-elevated-button\n >\n `\n : ''}\n ${this.isActivatable(user)\n ? html`<md-elevated-button danger @click=${() => this.onActivate(user)}>activate</md-elevated-button>`\n : ''}\n ${this.isInactivatable(user)\n ? html`<md-elevated-button danger @click=${() => this.onInactivate(user)}>inactivate</md-elevated-button>`\n : ''}\n </div>\n `\n }\n\n isRemovable(user) {\n return this.isDomainOwner && user.email !== this.me.email && !user.owner\n }\n\n isTransferable(user) {\n return (this.isSuperOwner || this.isDomainOwner) && !user.owner\n }\n\n isRoleEditable() {\n return this.activate && (this.domainRoles?.length || Object.keys(this.grantedRoles || {}).length)\n }\n\n isPasswordResettable(user) {\n return (this.isSuperOwner || this.isDomainOwner) && user.email !== this.me.email\n }\n\n isActivatable(user) {\n return (this.isSuperOwner || this.isDomainOwner) && !this.activate\n }\n\n isInactivatable(user) {\n return (\n (this.isSuperOwner || this.isDomainOwner) &&\n user.id !== this.domainOwner.id &&\n user.userType !== 'admin' &&\n this.activate\n )\n }\n\n async updated(changedProps) {\n if (changedProps.has('user')) {\n this.fetchAvailableRoles()\n\n if (this.user?.email) {\n this.userRoles = await this.fetchRolesOnUser(this.user.email)\n } else {\n this.userRoles = []\n }\n }\n }\n\n async fetchRolesOnUser(email) {\n const response = await client.query({\n query: gql`\n query ($email: EmailAddress!) {\n user(email: $email) {\n id\n name\n email\n roles {\n id\n name\n description\n domain {\n id\n }\n }\n }\n }\n `,\n variables: { email },\n context: gqlContext()\n })\n\n if (!response.errors) {\n return response.data.user?.roles || []\n }\n }\n\n async fetchAvailableRoles() {\n const response = await client.query({\n query: gql`\n query {\n roles {\n items {\n id\n domain {\n name\n }\n name\n description\n }\n total\n }\n grantedRoles {\n id\n role {\n id\n name\n description\n domain {\n name\n }\n }\n }\n }\n `,\n context: gqlContext()\n })\n\n if (!response.errors?.length) {\n this.domainRoles = response.data.roles.items || []\n this.grantedRoles = response.data.grantedRoles.reduce((grantedRoles, grantedRole) => {\n const { role } = grantedRole\n const { domain } = role\n if (grantedRoles[domain.name]) {\n grantedRoles[domain.name].push(role)\n } else {\n grantedRoles[domain.name] = [role]\n }\n\n return grantedRoles\n }, {})\n } else {\n this.domainRoles = []\n this.grantedRoles = []\n }\n }\n\n async onSave(user, availableRoles, selectedRoles) {\n if (user?.id) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($userId: String!, $availableRoles: [ObjectRef!]!, $selectedRoles: [ObjectRef!]!) {\n updateUserRoles(userId: $userId, availableRoles: $availableRoles, selectedRoles: $selectedRoles) {\n id\n name\n roles {\n id\n description\n }\n }\n }\n `,\n variables: { userId: user.id, availableRoles, selectedRoles },\n context: gqlContext()\n })\n\n if (!response.errors) {\n this.showToast(i18next.t('text.data_updated_successfully'))\n this.dispatchUserUpdated()\n }\n }\n }\n\n async onActivate(user) {\n const response = await client.mutate({\n mutation: gql`\n mutation activateUser($userId: String!) {\n activateUser(userId: $userId)\n }\n `,\n variables: { userId: user.id },\n context: gqlContext()\n })\n\n if (!response.errors) {\n this.showToast(i18next.t('text.user activated successfully'))\n\n this.dispatchUserUpdated()\n }\n }\n\n async onInactivate(user) {\n const response = await client.mutate({\n mutation: gql`\n mutation inactivateUser($userId: String!) {\n inactivateUser(userId: $userId)\n }\n `,\n variables: { userId: user.id },\n context: gqlContext()\n })\n\n if (!response.errors) {\n this.showToast(i18next.t('text.user activated successfully'))\n\n this.dispatchUserUpdated()\n }\n }\n\n async onDelete(user) {\n if (user.owner) {\n await OxPrompt.open({\n type: 'warning',\n title: i18next.t('text.cannot_delete'),\n text: i18next.t('text.x_cannot_delete', {\n x: i18next.t('label.domain-owner')\n }),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n\n return\n }\n\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.are_you_sure_to_x_user', {\n x: i18next.t('button.delete')\n }),\n confirmButton: { text: i18next.t('button.delete') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const response = await client.mutate({\n mutation: gql`\n mutation deleteDomaineUser($email: EmailAddress!) {\n deleteDomainUser(email: $email)\n }\n `,\n variables: { email: user.email },\n context: gqlContext()\n })\n\n if (!response.errors) {\n await OxPrompt.open({\n type: 'success',\n title: i18next.t('text.completed'),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n\n this.dispatchUserUpdated()\n }\n }\n }\n\n async onTransfer(user) {\n openPopup(\n html`\n <ownership-transfer-popup\n .user=${user}\n @ownershipTransferred=\"${this.dispatchOwnershipTransferred.bind(this)}\"\n ></ownership-transfer-popup>\n `,\n {\n size: 'small',\n title: `${i18next.t('title.owner_transfer')}`\n }\n )\n }\n\n async onResetPassword(user) {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.are_you_sure_to_x', { x: i18next.t('title.reset password') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const response = await client.mutate({\n mutation: gql`\n mutation resetPasswordToDefault($userId: String!) {\n resetPasswordToDefault(userId: $userId)\n }\n `,\n variables: { userId: user.id },\n context: gqlContext()\n })\n\n if (!response.errors) {\n await OxPrompt.open({\n type: 'success',\n title: i18next.t('text.completed'),\n text: i18next.t('text.password reset succeed'),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n }\n }\n }\n\n dispatchUserUpdated() {\n this.dispatchEvent(new CustomEvent('userUpdated'))\n }\n\n dispatchOwnershipTransferred() {\n this.dispatchEvent(new CustomEvent('ownershipTransferred'))\n }\n\n showToast(message) {\n document.dispatchEvent(new CustomEvent('notify', { detail: { message, option: { timer: 1000 } } }))\n }\n\n stateChanged(state) {\n this.me = state.auth?.user || {}\n this.isSuperOwner = this.me.super || false\n this.isDomainOwner = this.me.email === this.domainOwner.email || false\n }\n}\n"]}
1
+ {"version":3,"file":"user-role-editor.js","sourceRoot":"","sources":["../../client/components/user-role-editor.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,4BAA4B,CAAA;AACnC,OAAO,iBAAiB,CAAA;AAExB,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,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,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAA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AAC;IAED,YAAY,CAAC,KAAK;;QAChB,IAAI,CAAC,EAAE,GAAG,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,IAAI,KAAI,EAAE,CAAA;QAChC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,KAAK,CAAA;QAC1C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,IAAI,KAAK,CAAA;IACxE,CAAC;;AA5dM,qBAAM,GAAG;IACd,qBAAqB;IACrB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+DF;CACF,AAlEY,CAkEZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4CAAe;AACb;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;gDAA0B;AAC1B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDAAiB;AAEnC;IAAR,KAAK,EAAE;;mDAAwB;AACvB;IAAR,KAAK,EAAE;;oDAAuB;AACtB;IAAR,KAAK,EAAE;;iDAAsB;AACrB;IAAR,KAAK,EAAE;;oDAA8B;AAC7B;IAAR,KAAK,EAAE;;qDAA+B;AA7EnC,cAAc;IADnB,aAAa,CAAC,kBAAkB,CAAC;GAC5B,cAAc,CA8dnB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\n\nimport './ownership-transfer-popup'\nimport './role-selector'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin'\n\nimport { client, gqlContext } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\nimport { store } from '@operato/shell'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\nimport { ButtonContainerStyles } from '@operato/styles'\nimport { RoleSelector } from './role-selector'\n\n@customElement('user-role-editor')\nclass UserRoleEditor extends connect(store)(LitElement) {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n border: 1px solid var(--md-sys-color-primary);\n font: normal 15px var(--theme-font);\n color: var(--md-sys-color-secondary);\n }\n ul {\n flex: 1;\n display: grid;\n grid-template-columns: 1fr 1fr;\n column-gap: 20px;\n\n overflow: auto;\n margin: 0;\n padding: var(--padding-default);\n list-style: none;\n border: 1px dashed rgba(0, 0, 0, 0.1);\n border-width: 1px 0;\n }\n input[readonly] {\n border: none;\n background-color: transparent;\n color: var(--md-sys-color-secondary);\n font: var(--input-font);\n }\n li {\n padding: var(--padding-narrow);\n }\n [detail] {\n background-color: var(--md-sys-color-surface);\n }\n [detail] md-icon {\n --md-icon-size: var(--fontsize-default);\n vertical-align: middle;\n color: var(--md-sys-color-primary);\n }\n [detail] li {\n display: flex;\n }\n [detail] li input {\n flex: 1;\n }\n\n md-elevated-button {\n margin: 5px;\n }\n\n [danger] {\n --md-theme-primary: var(--md-danger-button-primary-color);\n }\n\n md-outlined-button {\n background-color: var(--md-sys-color-surface-variant);\n }\n\n @media screen and (max-width: 480px) {\n ul {\n grid-template-columns: 1fr;\n }\n }\n `\n ]\n\n @property({ type: Object }) user: any = {}\n @property({ type: Boolean }) activate: boolean = false\n @property({ type: Object }) domainOwner: any\n\n @state() domainRoles: any[] = []\n @state() grantedRoles: any = {}\n @state() userRoles: any[] = []\n @state() isSuperOwner: boolean = false\n @state() isDomainOwner: boolean = false\n\n private me: any\n\n render() {\n const user = this.user || {}\n const domainRoles = this.domainRoles || []\n const grantedRoles = this.grantedRoles || {}\n let currentDomainName = 'roles'\n if (domainRoles?.length) {\n currentDomainName = domainRoles[0].domain.name\n }\n\n return html`\n ${this.activate\n ? html`\n <ul detail>\n ${user.userType === 'user'\n ? html`\n <li>\n <span>\n <md-icon>email</md-icon>\n ${user.email}\n </span>\n </li>\n `\n : ''}\n </ul>\n\n <role-selector .user=${this.user} .roles=${domainRoles} .userRoles=${this.userRoles}></role-selector>\n\n ${Object.keys(grantedRoles).map(\n partnerName => html`\n <role-selector\n .roleCategory=${partnerName}\n .user=${this.user}\n .roles=${this.grantedRoles[partnerName]}\n .userRoles=${this.userRoles}\n >\n </role-selector>\n `\n )}\n `\n : ''}\n\n <div class=\"button-container\">\n ${this.isRoleEditable()\n ? html` <md-elevated-button\n @click=${() => {\n const { availableRoles, selectedRoles } = Array.from(\n this.renderRoot.querySelectorAll('role-selector') as NodeListOf<RoleSelector>\n ).reduce(\n (roles, roleSelector) => {\n roles.availableRoles = roles.availableRoles.concat(\n roleSelector.roles.map(r => {\n delete r.domain\n return r\n })\n )\n roles.selectedRoles = roles.selectedRoles.concat(\n roleSelector.selectedRoles().map(r => {\n //@ts-ignore\n delete r.domain\n return r\n })\n )\n return roles\n },\n { availableRoles: [], selectedRoles: [] } as { availableRoles: any[]; selectedRoles: any[] }\n )\n this.onSave(user, availableRoles, selectedRoles)\n }}\n >${String(i18next.t('button.save'))}</md-elevated-button\n >`\n : ''}\n ${user.userType === 'user'\n ? html`\n ${this.isTransferable(user)\n ? html`\n <md-elevated-button danger @click=${() => this.onTransfer(user)}\n >${String(i18next.t('button.transfer owner'))}</md-elevated-button\n >\n `\n : ''}\n ${this.isPasswordResettable(user)\n ? html`<md-elevated-button danger @click=${() => this.onResetPassword(user)}\n >${String(i18next.t('title.reset password'))}</md-elevated-button\n >`\n : ''}\n `\n : ''}\n ${this.isRemovable(user)\n ? html`\n <md-elevated-button danger @click=${() => this.onDelete(user)}\n >${String(i18next.t('button.delete user'))}</md-elevated-button\n >\n `\n : ''}\n ${this.isActivatable(user)\n ? html`<md-elevated-button danger @click=${() => this.onActivate(user)}\n >${String(i18next.t('button.activate'))}</md-elevated-button\n >`\n : ''}\n ${this.isInactivatable(user)\n ? html`<md-elevated-button danger @click=${() => this.onInactivate(user)}\n >${String(i18next.t('button.deactivate'))}</md-elevated-button\n >`\n : ''}\n </div>\n `\n }\n\n isRemovable(user) {\n return this.isDomainOwner && user.email !== this.me.email && !user.owner\n }\n\n isTransferable(user) {\n return (this.isSuperOwner || this.isDomainOwner) && !user.owner\n }\n\n isRoleEditable() {\n return this.activate && (this.domainRoles?.length || Object.keys(this.grantedRoles || {}).length)\n }\n\n isPasswordResettable(user) {\n return (this.isSuperOwner || this.isDomainOwner) && user.email !== this.me.email\n }\n\n isActivatable(user) {\n return (this.isSuperOwner || this.isDomainOwner) && !this.activate\n }\n\n isInactivatable(user) {\n return (\n (this.isSuperOwner || this.isDomainOwner) &&\n user.id !== this.domainOwner.id &&\n user.userType !== 'admin' &&\n this.activate\n )\n }\n\n async updated(changedProps) {\n if (changedProps.has('user')) {\n this.fetchAvailableRoles()\n\n if (this.user?.email) {\n this.userRoles = await this.fetchRolesOnUser(this.user.email)\n } else {\n this.userRoles = []\n }\n }\n }\n\n async fetchRolesOnUser(email) {\n const response = await client.query({\n query: gql`\n query ($email: EmailAddress!) {\n user(email: $email) {\n id\n name\n email\n roles {\n id\n name\n description\n domain {\n id\n }\n }\n }\n }\n `,\n variables: { email },\n context: gqlContext()\n })\n\n if (!response.errors) {\n return response.data.user?.roles || []\n }\n }\n\n async fetchAvailableRoles() {\n const response = await client.query({\n query: gql`\n query {\n roles {\n items {\n id\n domain {\n name\n }\n name\n description\n }\n total\n }\n grantedRoles {\n id\n role {\n id\n name\n description\n domain {\n name\n }\n }\n }\n }\n `,\n context: gqlContext()\n })\n\n if (!response.errors?.length) {\n this.domainRoles = response.data.roles.items || []\n this.grantedRoles = response.data.grantedRoles.reduce((grantedRoles, grantedRole) => {\n const { role } = grantedRole\n const { domain } = role\n if (grantedRoles[domain.name]) {\n grantedRoles[domain.name].push(role)\n } else {\n grantedRoles[domain.name] = [role]\n }\n\n return grantedRoles\n }, {})\n } else {\n this.domainRoles = []\n this.grantedRoles = []\n }\n }\n\n async onSave(user, availableRoles, selectedRoles) {\n if (user?.id) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($userId: String!, $availableRoles: [ObjectRef!]!, $selectedRoles: [ObjectRef!]!) {\n updateUserRoles(userId: $userId, availableRoles: $availableRoles, selectedRoles: $selectedRoles) {\n id\n name\n roles {\n id\n description\n }\n }\n }\n `,\n variables: { userId: user.id, availableRoles, selectedRoles },\n context: gqlContext()\n })\n\n if (!response.errors) {\n this.showToast(i18next.t('text.data_updated_successfully'))\n this.dispatchUserUpdated()\n }\n }\n }\n\n async onActivate(user) {\n const response = await client.mutate({\n mutation: gql`\n mutation activateUser($userId: String!) {\n activateUser(userId: $userId)\n }\n `,\n variables: { userId: user.id },\n context: gqlContext()\n })\n\n if (!response.errors) {\n this.showToast(i18next.t('text.user activated successfully'))\n\n this.dispatchUserUpdated()\n }\n }\n\n async onInactivate(user) {\n const response = await client.mutate({\n mutation: gql`\n mutation inactivateUser($userId: String!) {\n inactivateUser(userId: $userId)\n }\n `,\n variables: { userId: user.id },\n context: gqlContext()\n })\n\n if (!response.errors) {\n this.showToast(i18next.t('text.user activated successfully'))\n\n this.dispatchUserUpdated()\n }\n }\n\n async onDelete(user) {\n if (user.owner) {\n await OxPrompt.open({\n type: 'warning',\n title: i18next.t('text.cannot_delete'),\n text: i18next.t('text.x_cannot_delete', {\n x: i18next.t('label.domain-owner')\n }),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n\n return\n }\n\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.are_you_sure_to_x_user', {\n x: i18next.t('button.delete')\n }),\n confirmButton: { text: i18next.t('button.delete') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const response = await client.mutate({\n mutation: gql`\n mutation deleteDomaineUser($email: EmailAddress!) {\n deleteDomainUser(email: $email)\n }\n `,\n variables: { email: user.email },\n context: gqlContext()\n })\n\n if (!response.errors) {\n await OxPrompt.open({\n type: 'success',\n title: i18next.t('text.completed'),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n\n this.dispatchUserUpdated()\n }\n }\n }\n\n async onTransfer(user) {\n openPopup(\n html`\n <ownership-transfer-popup\n .user=${user}\n @ownershipTransferred=\"${this.dispatchOwnershipTransferred.bind(this)}\"\n ></ownership-transfer-popup>\n `,\n {\n size: 'small',\n title: `${i18next.t('title.owner_transfer')}`\n }\n )\n }\n\n async onResetPassword(user) {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.are_you_sure_to_x', { x: i18next.t('title.reset password') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const response = await client.mutate({\n mutation: gql`\n mutation resetPasswordToDefault($userId: String!) {\n resetPasswordToDefault(userId: $userId)\n }\n `,\n variables: { userId: user.id },\n context: gqlContext()\n })\n\n if (!response.errors) {\n await OxPrompt.open({\n type: 'success',\n title: i18next.t('text.completed'),\n text: i18next.t('text.password reset succeed'),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n }\n }\n }\n\n dispatchUserUpdated() {\n this.dispatchEvent(new CustomEvent('userUpdated'))\n }\n\n dispatchOwnershipTransferred() {\n this.dispatchEvent(new CustomEvent('ownershipTransferred'))\n }\n\n showToast(message) {\n document.dispatchEvent(new CustomEvent('notify', { detail: { message, option: { timer: 1000 } } }))\n }\n\n stateChanged(state) {\n this.me = state.auth?.user || {}\n this.isSuperOwner = this.me.super || false\n this.isDomainOwner = this.me.email === this.domainOwner.email || false\n }\n}\n"]}
@@ -12,11 +12,11 @@ export declare class AuthActivate extends AuthActivate_base {
12
12
  email?: string | null;
13
13
  form: HTMLFormElement;
14
14
  private _applicationMeta?;
15
- render(): import("lit").TemplateResult<1>;
15
+ render(): import("lit-html").TemplateResult<1>;
16
16
  get applicationMeta(): {
17
- icon?: string | undefined;
18
- title?: string | undefined;
19
- description?: string | undefined;
17
+ icon?: string;
18
+ title?: string;
19
+ description?: string;
20
20
  };
21
21
  firstUpdated(): void;
22
22
  updated(changed: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"activate.js","sourceRoot":"","sources":["../../../client/entries/auth/activate.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,0BAA0B,CAAA;AACjC,OAAO,iCAAiC,CAAA;AACxC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG1C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IA0H7D,MAAM;QACJ,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,eAAe,CAAA;QAEvD,OAAO,IAAI,CAAA;;;qBAGM,IAAI;iCACQ,KAAK;sCACA,WAAW;;;;;;;;;;;;oBAY7B,CAAC,CAAC,EAAE;YACZ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;;;qDAG0C,IAAI,CAAC,KAAK,IAAI,EAAE;;;;;uCAK9B,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;;cAEnD,OAAO,CAAC,CAAC,CAAC,6BAA6B,CAAC;;;qBAGjC,CAAC,CAAC,EAAE;YACX,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;QACzC,CAAC;;;cAGC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;;;;;;;;;;;;;KAavC,CAAA;IACH,CAAC;IAED,IAAI,eAAe;QACjB,IAAI,CA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CAAC,MAAM,GAAG,KAAK,CAAA;YACzB,CAAC,EAAE,KAAK,CAAC,CAAA;IACb,CAAC;;AAhQM,mBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8GF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CAAU;AACrC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CAAsB;AAEjD;IAAC,KAAK,CAAC,OAAO,CAAC;8BAAQ,eAAe;0CAAA;AAtH3B,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAkQxB;SAlQY,YAAY","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\n\nimport '@operato/i18n/ox-i18n.js'\nimport '@operato/layout/ox-snack-bar.js'\nimport '@operato/lottie-player'\nimport '../../components/contact-us'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\n\n@customElement('auth-activate')\nexport class AuthActivate extends localize(i18next)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n width: 100vw;\n height: 100vh;\n height: 100dvh;\n background-color: var(--auth-background, var(--md-sys-color-primary));\n }\n\n .wrap {\n display: block;\n width: 450px;\n min-width: 350px;\n margin: 0 auto;\n text-align: center;\n }\n\n .auth-brand {\n color: #fff;\n }\n\n .auth-brand img {\n margin: 15% auto 5px auto;\n width: 100px;\n border: 3px solid var(--md-sys-color-on-primary);\n border-radius: 25px;\n box-shadow: var(--box-shadow);\n }\n\n .name {\n display: block;\n font: var(--auth-brand-name);\n text-shadow: var(--auth-brand-name-shadow);\n }\n\n h1 {\n margin: 50px 0 0 0;\n padding: 0;\n font-size: 24px;\n color: var(--auth-title-color, var(--md-sys-color-on-primary));\n }\n\n p {\n margin: 0;\n padding: var(--auth-description-padding);\n font: var(--auth-description-font);\n color: var(--auth-description-color, var(--md-sys-color-on-secondary));\n }\n\n #button-area {\n border-top: 1px dashed #ccc;\n padding-top: 10px;\n }\n\n md-elevated-button {\n --md-theme-primary: var(--md-sys-color-on-primary);\n --md-theme-on-primary: var(--md-sys-color-primary);\n --md-button-horizontal-padding: var(--spacing-medium);\n --md-button-ink-color: var(--md-sys-color-primary);\n }\n\n contact-us {\n display: flex;\n padding: 50px;\n flex-direction: column;\n }\n\n .lottie-container {\n width: 100%;\n height: 300px;\n position: absolute;\n left: 0;\n bottom: 0;\n pointer-events: none;\n }\n\n .lottie-container lottie-player {\n position: absolute;\n bottom: -6%;\n width: 100%;\n height: auto;\n }\n\n @media (max-width: 450px) {\n .wrap {\n width: 85%;\n min-width: 320px;\n padding-bottom: 100px;\n }\n\n .auth-form {\n grid-template-columns: 1fr;\n }\n\n .auth-brand img {\n margin: 12% auto 5px auto;\n width: 75px;\n }\n\n .lottie-container {\n overflow: hidden;\n height: 200px;\n pointer-events: none;\n }\n\n .lottie-container lottie-player {\n width: 1200px;\n left: -30%;\n }\n }\n `\n ]\n\n @property({ type: Object }) data: any\n @property({ type: String }) email?: string | null\n\n @query('#form') form!: HTMLFormElement\n\n private _applicationMeta?: { icon?: string; title?: string; description?: string }\n\n render() {\n var { icon, title, description } = this.applicationMeta\n\n return html`\n <div class=\"wrap\">\n <div class=\"auth-brand\">\n <img src=${icon} />\n <strong class=\"name\">${title}</strong>\n <span class=\"welcome-msg\">${description}</span>\n </div>\n\n <h1><ox-i18n msgid=\"text.your account is not activated\"></ox-i18n></h1>\n\n <!--description message container-->\n <p></p>\n\n <form\n id=\"form\"\n action=\"/auth/resend-verification-email\"\n method=\"POST\"\n @submit=${e => {\n this.requestResend(e)\n }}\n hidden\n >\n <input name=\"email\" type=\"hidden\" .value=${this.email || ''} required />\n <button id=\"submit-button\" type=\"submit\"><ox-i18n msgid=\"label.change password\"></ox-i18n></button>\n </form>\n\n <div id=\"button-area\">\n <md-elevated-button @click=${e => this.requestResend(e)}>\n <md-icon slot=\"icon\">mail_outline</md-icon>\n ${i18next.t('label.send activation email')}\n </md-elevated-button>\n <md-elevated-button\n @click=${e => {\n window.location.replace('/auth/signin')\n }}\n >\n <md-icon slot=\"icon\">home</md-icon>\n ${i18next.t('button.go to home')}\n </md-elevated-button>\n </div>\n <contact-us></contact-us>\n\n <!--lottie animation begin-->\n <div class=\"lottie-container\">\n <lottie-player autoplay loop src=\"../../assets/images/background-animation.json\"></lottie-player>\n </div>\n <!--lottie animation end-->\n </div>\n\n <ox-snack-bar id=\"snackbar\"></ox-snack-bar>\n `\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 firstUpdated() {\n var searchParams = new URLSearchParams(window.location.search)\n this.email = searchParams.get('email')\n }\n\n updated(changed) {\n if (changed.has('data')) {\n this.email = this.data?.email\n }\n }\n\n async requestResend(e) {\n var timer\n var formData = new FormData(this.form)\n var button = e.target\n try {\n var controller = new AbortController()\n var signal = controller.signal\n\n button.disabled = true\n timer = setTimeout(() => {\n controller.abort()\n throw new Error('timeout')\n }, 30 * 1000)\n\n var response = await fetch('/auth/resend-verification-email', {\n credentials: 'include',\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(Object.fromEntries(formData.entries())),\n signal\n })\n\n if (response) {\n this.showSnackbar({\n level: response.ok ? 'info' : 'error',\n message: await response.text()\n })\n }\n } catch (e) {\n } finally {\n button.disabled = false\n clearTimeout(timer)\n }\n }\n\n showSnackbar({ level, message, timer = 3000 }: { level: 'info' | 'error'; message: string; timer?: number }) {\n const snackbar = this.renderRoot.querySelector('#snackbar') as HTMLElement & {\n level: 'info' | 'error'\n message: string\n active: boolean\n }\n\n snackbar.level = level\n snackbar.message = message\n snackbar.active = true\n\n if (timer > -1)\n setTimeout(() => {\n snackbar.active = false\n }, timer)\n }\n}\n"]}
1
+ {"version":3,"file":"activate.js","sourceRoot":"","sources":["../../../client/entries/auth/activate.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,0BAA0B,CAAA;AACjC,OAAO,iCAAiC,CAAA;AACxC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAElE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG1C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IA0H7D,MAAM;QACJ,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,eAAe,CAAA;QAEvD,OAAO,IAAI,CAAA;;;qBAGM,IAAI;iCACQ,KAAK;sCACA,WAAW;;;;;;;;;;;;oBAY7B,CAAC,CAAC,EAAE;YACZ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;QACvB,CAAC;;;qDAG0C,IAAI,CAAC,KAAK,IAAI,EAAE;;;;;uCAK9B,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;;cAEnD,OAAO,CAAC,CAAC,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AAG,IAAI,EAAgE;QACzG,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAIzD,CAAA;QAED,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAA;QACtB,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAA;QAC1B,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAA;QAEtB,IAAI,KAAK,GAAG,CAAC,CAAC;YACZ,UAAU,CAAC,GAAG,EAAE;gBACd,QAAQ,CAAC,MAAM,GAAG,KAAK,CAAA;YACzB,CAAC,EAAE,KAAK,CAAC,CAAA;IACb,CAAC;;AAhQM,mBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8GF;CACF,AAhHY,CAgHZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CAAU;AACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CAAsB;AAEjC;IAAf,KAAK,CAAC,OAAO,CAAC;8BAAQ,eAAe;0CAAA;AAtH3B,YAAY;IADxB,aAAa,CAAC,eAAe,CAAC;GAClB,YAAY,CAkQxB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\n\nimport '@operato/i18n/ox-i18n.js'\nimport '@operato/layout/ox-snack-bar.js'\nimport '@operato/lottie-player'\nimport '../../components/contact-us'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\n\n@customElement('auth-activate')\nexport class AuthActivate extends localize(i18next)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n width: 100vw;\n height: 100vh;\n height: 100dvh;\n background-color: var(--auth-background, var(--md-sys-color-primary));\n }\n\n .wrap {\n display: block;\n width: 450px;\n min-width: 350px;\n margin: 0 auto;\n text-align: center;\n }\n\n .auth-brand {\n color: #fff;\n }\n\n .auth-brand img {\n margin: 15% auto 5px auto;\n width: 100px;\n border: 3px solid var(--md-sys-color-on-primary);\n border-radius: 25px;\n box-shadow: var(--box-shadow);\n }\n\n .name {\n display: block;\n font: var(--auth-brand-name);\n text-shadow: var(--auth-brand-name-shadow);\n }\n\n h1 {\n margin: 50px 0 0 0;\n padding: 0;\n font-size: 24px;\n color: var(--auth-title-color, var(--md-sys-color-on-primary));\n }\n\n p {\n margin: 0;\n padding: var(--auth-description-padding);\n font: var(--auth-description-font);\n color: var(--auth-description-color, var(--md-sys-color-on-secondary));\n }\n\n #button-area {\n border-top: 1px dashed #ccc;\n padding-top: 10px;\n }\n\n md-elevated-button {\n --md-theme-primary: var(--md-sys-color-on-primary);\n --md-theme-on-primary: var(--md-sys-color-primary);\n --md-button-horizontal-padding: var(--spacing-medium);\n --md-button-ink-color: var(--md-sys-color-primary);\n }\n\n contact-us {\n display: flex;\n padding: 50px;\n flex-direction: column;\n }\n\n .lottie-container {\n width: 100%;\n height: 300px;\n position: absolute;\n left: 0;\n bottom: 0;\n pointer-events: none;\n }\n\n .lottie-container lottie-player {\n position: absolute;\n bottom: -6%;\n width: 100%;\n height: auto;\n }\n\n @media (max-width: 450px) {\n .wrap {\n width: 85%;\n min-width: 320px;\n padding-bottom: 100px;\n }\n\n .auth-form {\n grid-template-columns: 1fr;\n }\n\n .auth-brand img {\n margin: 12% auto 5px auto;\n width: 75px;\n }\n\n .lottie-container {\n overflow: hidden;\n height: 200px;\n pointer-events: none;\n }\n\n .lottie-container lottie-player {\n width: 1200px;\n left: -30%;\n }\n }\n `\n ]\n\n @property({ type: Object }) data: any\n @property({ type: String }) email?: string | null\n\n @query('#form') form!: HTMLFormElement\n\n private _applicationMeta?: { icon?: string; title?: string; description?: string }\n\n render() {\n var { icon, title, description } = this.applicationMeta\n\n return html`\n <div class=\"wrap\">\n <div class=\"auth-brand\">\n <img src=${icon} />\n <strong class=\"name\">${title}</strong>\n <span class=\"welcome-msg\">${description}</span>\n </div>\n\n <h1><ox-i18n msgid=\"text.your account is not activated\"></ox-i18n></h1>\n\n <!--description message container-->\n <p></p>\n\n <form\n id=\"form\"\n action=\"/auth/resend-verification-email\"\n method=\"POST\"\n @submit=${e => {\n this.requestResend(e)\n }}\n hidden\n >\n <input name=\"email\" type=\"hidden\" .value=${this.email || ''} required />\n <button id=\"submit-button\" type=\"submit\"><ox-i18n msgid=\"label.change password\"></ox-i18n></button>\n </form>\n\n <div id=\"button-area\">\n <md-elevated-button @click=${e => this.requestResend(e)}>\n <md-icon slot=\"icon\">mail_outline</md-icon>\n ${i18next.t('label.send activation email')}\n </md-elevated-button>\n <md-elevated-button\n @click=${e => {\n window.location.replace('/auth/signin')\n }}\n >\n <md-icon slot=\"icon\">home</md-icon>\n ${i18next.t('button.go to home')}\n </md-elevated-button>\n </div>\n <contact-us></contact-us>\n\n <!--lottie animation begin-->\n <div class=\"lottie-container\">\n <lottie-player autoplay loop src=\"../../assets/images/background-animation.json\"></lottie-player>\n </div>\n <!--lottie animation end-->\n </div>\n\n <ox-snack-bar id=\"snackbar\"></ox-snack-bar>\n `\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 firstUpdated() {\n var searchParams = new URLSearchParams(window.location.search)\n this.email = searchParams.get('email')\n }\n\n updated(changed) {\n if (changed.has('data')) {\n this.email = this.data?.email\n }\n }\n\n async requestResend(e) {\n var timer\n var formData = new FormData(this.form)\n var button = e.target\n try {\n var controller = new AbortController()\n var signal = controller.signal\n\n button.disabled = true\n timer = setTimeout(() => {\n controller.abort()\n throw new Error('timeout')\n }, 30 * 1000)\n\n var response = await fetch('/auth/resend-verification-email', {\n credentials: 'include',\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(Object.fromEntries(formData.entries())),\n signal\n })\n\n if (response) {\n this.showSnackbar({\n level: response.ok ? 'info' : 'error',\n message: await response.text()\n })\n }\n } catch (e) {\n } finally {\n button.disabled = false\n clearTimeout(timer)\n }\n }\n\n showSnackbar({ level, message, timer = 3000 }: { level: 'info' | 'error'; message: string; timer?: number }) {\n const snackbar = this.renderRoot.querySelector('#snackbar') as HTMLElement & {\n level: 'info' | 'error'\n message: string\n active: boolean\n }\n\n snackbar.level = level\n snackbar.message = message\n snackbar.active = true\n\n if (timer > -1)\n setTimeout(() => {\n snackbar.active = false\n }, timer)\n }\n}\n"]}
@@ -11,13 +11,13 @@ export declare class AuthCheckIn extends AuthCheckIn_base {
11
11
  user: any;
12
12
  private _applicationMeta?;
13
13
  private redirectTo?;
14
- render(): import("lit").TemplateResult<1>;
14
+ render(): import("lit-html").TemplateResult<1>;
15
15
  updated(changed: any): void;
16
16
  navigateToUrl(url: any): void;
17
17
  get applicationMeta(): {
18
- icon?: string | undefined;
19
- title?: string | undefined;
20
- description?: string | undefined;
18
+ icon?: string;
19
+ title?: string;
20
+ description?: string;
21
21
  };
22
22
  }
23
23
  export {};
@@ -132,12 +132,11 @@ AuthCheckIn.styles = [
132
132
  cursor: pointer;
133
133
  }
134
134
  li:hover {
135
- background-color: rgba(var(--primary-color-rgb), 0.2);
135
+ background-color: var(--md-sys-color-primary-container);
136
136
  }
137
137
  li span {
138
138
  display: block;
139
139
  font: normal var(--fontsize-default) var(--theme-font);
140
- color: var(--secondary-text-color);
141
140
  }
142
141
  li md-icon {
143
142
  float: right;
@@ -1 +1 @@
1
- {"version":3,"file":"checkin.js","sourceR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,QAAQ,GAA2B,QAAQ,CAAC,aAAa,CAAC,8BAA8B,CAAC,CAAA;YAC7F,IAAI,SAAS,GAA2B,QAAQ,CAAC,aAAa,CAAC,+BAA+B,CAAC,CAAA;YAC/F,IAAI,eAAe,GAA2B,QAAQ,CAAC,aAAa,CAAC,sCAAsC,CAAC,CAAA;YAE5G,IAAI,CAAC,gBAAgB,GAAG;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;SACF;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC9B,CAAC;;AAnKM,kBAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8DF;IACD,eAAe;CAChB,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCAAU;AACrC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;4CAAoB;AAC9C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CAAoB;AAC/C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCAAU;AAxE1B,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAqKvB;SArKY,WAAW","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\n\nimport '@operato/lottie-player'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { isSafari } from '@operato/utils'\n\nimport { AUTH_STYLE_SIGN } from '../../auth-style-sign'\n\n@customElement('auth-checkin')\nexport class AuthCheckIn extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n margin: auto;\n background-color: var(--auth-background, var(--md-sys-color-primary));\n height: 100vh;\n height: 100dvh;\n }\n .header {\n background-color: var(--md-sys-color-primary);\n height: var(--checkin-header-height);\n }\n .content {\n flex: 1;\n overflow: auto;\n }\n\n .domains {\n margin: var(--margin-wide) 0;\n padding: 0;\n background-color: var(--md-sys-color-surface);\n border-radius: var(--border-radius);\n border: var(--border-dim-color);\n list-style: none;\n }\n li {\n border-bottom: var(--border-dim-color);\n margin-bottom: -1px;\n padding: var(--padding-default) var(--padding-wide);\n font-size: 18px;\n color: var(--md-sys-color-secondary);\n text-align: left;\n\n cursor: pointer;\n }\n li:hover {\n background-color: rgba(var(--primary-color-rgb), 0.2);\n }\n li span {\n display: block;\n font: normal var(--fontsize-default) var(--theme-font);\n color: var(--secondary-text-color);\n }\n li md-icon {\n float: right;\n margin: 2px 0 0 0;\n opacity: 0.5;\n }\n .button-container {\n text-align: center;\n }\n .button-container md-elevated-button {\n margin-left: var(--margin-narrow);\n }\n\n @media (max-width: 450px) {\n .button-container md-elevated-button {\n width: 100%;\n margin: var(--margin-default) 0 0 0;\n }\n }\n `,\n AUTH_STYLE_SIGN\n ]\n\n @property({ type: Object }) data: any\n @property({ type: Array }) domains: any[] = []\n @property({ type: String }) domainType?: string\n @property({ type: Object }) user: any\n\n private _applicationMeta?: { icon?: string; title?: string; description?: string }\n private redirectTo?: string\n\n render() {\n var { icon, title, description } = this.applicationMeta\n\n return html`\n <div class=\"content md-typescale-display-medium\">\n <div class=\"wrap\">\n <div class=\"auth-brand\">\n <img src=${icon || ''} />\n <strong class=\"name\">${title}</strong>\n <span class=\"welcome-msg\">${description}</span>\n </div>\n\n <h3>${i18next.t('label.select_domain')}</h3>\n\n ${this.domains?.length\n ? html`\n <ul class=\"domains\">\n ${this.domains.map(\n domain => html`\n <li\n @click=${() =>\n (location.href = `/auth/checkin/${domain.subdomain}?redirect_to=${encodeURIComponent(this.redirectTo || '/')}`)}\n >\n <md-icon>keyboard_arrow_right</md-icon>\n <strong>${domain.name}</strong>\n <span>${domain.description}</span>\n </li>\n `\n )}\n </ul>\n `\n : html` <h3>${i18next.t('text.no domain available')}</h3> `}\n\n <div class=\"button-container\">\n <md-elevated-button @click=${() => (location.pathname = '/auth/signout')}\n >${String(i18next.t('button.logout'))}</md-elevated-button\n >\n\n ${this.domainType?.toLowerCase() === 'company'\n ? html`<md-elevated-button\n @click=${e => (location.href = `/public/business-register?email=${this.user?.email}`)}\n >${String(i18next.t('button.register business domain'))}</md-elevated-button\n > `\n : ''}\n </div>\n\n ${isSafari()\n ? html``\n : html`\n <div class=\"lottie-container\">\n <lottie-player autoplay loop src=\"../../assets/images/background-animation.json\"></lottie-player>\n </div>\n `}\n </div>\n </div>\n `\n }\n\n updated(changed) {\n if (changed.has('data')) {\n this.domains = this.data.domains\n this.user = this.data.user\n this.domainType = this.data.domainType\n this.redirectTo = this.data.redirectTo\n\n this.requestUpdate()\n }\n }\n\n navigateToUrl(url) {\n location.pathname = url\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"]}
1
+ {"version":3,"file":"checkin.js","sourceRoot":"","sources":["../../../client/entries/auth/checkin.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,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YAC7F,IAAI,SAAS,GAA2B,QAAQ,CAAC,aAAa,CAAC,+BAA+B,CAAC,CAAA;YAC/F,IAAI,eAAe,GAA2B,QAAQ,CAAC,aAAa,CAAC,sCAAsC,CAAC,CAAA;YAE5G,IAAI,CAAC,gBAAgB,GAAG;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;;AAlKM,kBAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6DF;IACD,eAAe;CAChB,AAjEY,CAiEZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCAAU;AACV;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;4CAAoB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CAAoB;AACnB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCAAU;AAvE1B,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAoKvB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\n\nimport '@operato/lottie-player'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { isSafari } from '@operato/utils'\n\nimport { AUTH_STYLE_SIGN } from '../../auth-style-sign'\n\n@customElement('auth-checkin')\nexport class AuthCheckIn extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n margin: auto;\n background-color: var(--auth-background, var(--md-sys-color-primary));\n height: 100vh;\n height: 100dvh;\n }\n .header {\n background-color: var(--md-sys-color-primary);\n height: var(--checkin-header-height);\n }\n .content {\n flex: 1;\n overflow: auto;\n }\n\n .domains {\n margin: var(--margin-wide) 0;\n padding: 0;\n background-color: var(--md-sys-color-surface);\n border-radius: var(--border-radius);\n border: var(--border-dim-color);\n list-style: none;\n }\n li {\n border-bottom: var(--border-dim-color);\n margin-bottom: -1px;\n padding: var(--padding-default) var(--padding-wide);\n font-size: 18px;\n color: var(--md-sys-color-secondary);\n text-align: left;\n\n cursor: pointer;\n }\n li:hover {\n background-color: var(--md-sys-color-primary-container);\n }\n li span {\n display: block;\n font: normal var(--fontsize-default) var(--theme-font);\n }\n li md-icon {\n float: right;\n margin: 2px 0 0 0;\n opacity: 0.5;\n }\n .button-container {\n text-align: center;\n }\n .button-container md-elevated-button {\n margin-left: var(--margin-narrow);\n }\n\n @media (max-width: 450px) {\n .button-container md-elevated-button {\n width: 100%;\n margin: var(--margin-default) 0 0 0;\n }\n }\n `,\n AUTH_STYLE_SIGN\n ]\n\n @property({ type: Object }) data: any\n @property({ type: Array }) domains: any[] = []\n @property({ type: String }) domainType?: string\n @property({ type: Object }) user: any\n\n private _applicationMeta?: { icon?: string; title?: string; description?: string }\n private redirectTo?: string\n\n render() {\n var { icon, title, description } = this.applicationMeta\n\n return html`\n <div class=\"content md-typescale-display-medium\">\n <div class=\"wrap\">\n <div class=\"auth-brand\">\n <img src=${icon || ''} />\n <strong class=\"name\">${title}</strong>\n <span class=\"welcome-msg\">${description}</span>\n </div>\n\n <h3>${i18next.t('label.select_domain')}</h3>\n\n ${this.domains?.length\n ? html`\n <ul class=\"domains\">\n ${this.domains.map(\n domain => html`\n <li\n @click=${() =>\n (location.href = `/auth/checkin/${domain.subdomain}?redirect_to=${encodeURIComponent(this.redirectTo || '/')}`)}\n >\n <md-icon>keyboard_arrow_right</md-icon>\n <strong>${domain.name}</strong>\n <span>${domain.description}</span>\n </li>\n `\n )}\n </ul>\n `\n : html` <h3>${i18next.t('text.no domain available')}</h3> `}\n\n <div class=\"button-container\">\n <md-elevated-button @click=${() => (location.pathname = '/auth/signout')}\n >${String(i18next.t('button.logout'))}</md-elevated-button\n >\n\n ${this.domainType?.toLowerCase() === 'company'\n ? html`<md-elevated-button\n @click=${e => (location.href = `/public/business-register?email=${this.user?.email}`)}\n >${String(i18next.t('button.register business domain'))}</md-elevated-button\n > `\n : ''}\n </div>\n\n ${isSafari()\n ? html``\n : html`\n <div class=\"lottie-container\">\n <lottie-player autoplay loop src=\"../../assets/images/background-animation.json\"></lottie-player>\n </div>\n `}\n </div>\n </div>\n `\n }\n\n updated(changed) {\n if (changed.has('data')) {\n this.domains = this.data.domains\n this.user = this.data.user\n this.domainType = this.data.domainType\n this.redirectTo = this.data.redirectTo\n\n this.requestUpdate()\n }\n }\n\n navigateToUrl(url) {\n location.pathname = url\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"]}
@@ -8,8 +8,8 @@ export declare class ForgotPassword extends AbstractAuthPage {
8
8
  button: HTMLInputElement;
9
9
  get pageName(): string;
10
10
  get actionUrl(): string;
11
- get formfields(): import("lit").TemplateResult<1>;
12
- get links(): import("lit").TemplateResult<1>;
11
+ get formfields(): import("lit-html").TemplateResult<1>;
12
+ get links(): import("lit-html").TemplateResult<1>;
13
13
  submit(): Promise<void>;
14
14
  showSnackbar({ message, level }: {
15
15
  message: any;
@@ -1 +1 @@
1
- {"version":3,"file":"forgot-password.js","sourceRoot":"","sources":["../../../client/entries/auth/forgot-password.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,qCAAqC,CAAA;AAE5C,OAAO,0BAA0B,CAAA;AACjC,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAG/D,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,gBAAgB;IAIlD,IAAI,QAAQ;QACV,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,uBAAuB,CAAA;IAChC,CAAC;IAED,IAAI,UAAU;;QACZ,MAAM,KAAK,GAAG,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,KAAK,KAAI,EAAE,CAAA;QAEpC,OAAO,IAAI,CAAA;;;;;kBAKG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;mBAC/B,KAAK;;mBAEL,CAAC,CAAQ,EAAE,EAAE;YACpB,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAA;YAC3C,IAAI,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE;gBAChC,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAA;aAC1D;iBAAM;gBACL,MAAM,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAA;aAC7B;QACH,CAAC;;;sFAG2E,CAAC,CAAC,EAAE,CAAC,IAAI,CAA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E,OAAO,EAAE,KAAK,EAAE;QAC7B,KAAK,CAAC,YAAY,CAAC;YACjB,KAAK;YACL,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAvFC;IAAC,KAAK,CAAC,QAAQ,CAAC;8BAAc,gBAAgB;kDAAA;AAC9C;IAAC,KAAK,CAAC,gBAAgB,CAAC;8BAAU,gBAAgB;8CAAA;AAFvC,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAwF1B;SAxFY,cAAc","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@material/web/button/text-button.js'\n\nimport '@operato/i18n/ox-i18n.js'\nimport '../../components/profile-component'\n\nimport { html } from 'lit'\nimport { customElement, query } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\n\nimport { AbstractAuthPage } from '../../components/abstract-auth-page'\n\n@customElement('forgot-password')\nexport class ForgotPassword extends AbstractAuthPage {\n @query('#email') emailInput!: HTMLInputElement\n @query('#submit-button') button!: HTMLInputElement\n\n get pageName() {\n return 'forgot password'\n }\n\n get actionUrl() {\n return '/auth/forgot-password'\n }\n\n get formfields() {\n const email = this.data?.email || ''\n\n return html`\n <div class=\"field\">\n <md-filled-text-field\n name=\"email\"\n type=\"email\"\n label=${String(i18next.t('label.email'))}\n .value=${email}\n required\n @input=${(e: Event) => {\n const target = e.target as HTMLInputElement\n if (target.validity.typeMismatch) {\n target.setCustomValidity(i18next.t('text.invalid-email'))\n } else {\n target.setCustomValidity('')\n }\n }}\n ></md-filled-text-field>\n </div>\n <md-elevated-button id=\"submit-button\" class=\"ui button\" type=\"submit\" @click=${e => this._onSubmit(e)}>\n <ox-i18n msgid=\"button.submit\"></ox-i18n>\n </md-elevated-button>\n `\n }\n\n get links() {\n return html`\n <a class=\"link\" href=\"/auth/signin\">\n <md-text-button><ox-i18n msgid=\"field.sign in\"></ox-i18n></md-text-button>\n </a>\n `\n }\n\n async submit() {\n var timer\n var formData = new FormData(this.formEl)\n\n try {\n var controller = new AbortController()\n var signal = controller.signal\n\n this.button.disabled = true\n timer = setTimeout(() => {\n controller.abort()\n throw new Error('timeout')\n }, 30 * 1000)\n\n var response = await fetch('/auth/forgot-password', {\n credentials: 'include',\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(Object.fromEntries(formData.entries())),\n signal\n })\n\n this.showSnackbar({\n message: await response.text(),\n level: response.ok ? 'info' : 'error'\n })\n } catch (e) {\n } finally {\n this.button.disabled = false\n clearTimeout(timer)\n }\n }\n\n showSnackbar({ message, level }) {\n super.showSnackbar({\n level,\n message\n })\n }\n}\n"]}
1
+ {"version":3,"file":"forgot-password.js","sourceRoot":"","sources":["../../../client/entries/auth/forgot-password.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,qCAAqC,CAAA;AAE5C,OAAO,0BAA0B,CAAA;AACjC,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAG/D,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,gBAAgB;IAIlD,IAAI,QAAQ;QACV,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,uBAAuB,CAAA;IAChC,CAAC;IAED,IAAI,UAAU;;QACZ,MAAM,KAAK,GAAG,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,KAAK,KAAI,EAAE,CAAA;QAEpC,OAAO,IAAI,CAAA;;;;;kBAKG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;mBAC/B,KAAK;;mBAEL,CAAC,CAAQ,EAAE,EAAE;YACpB,MAAM,MAAM,GAAG,CAAC,C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AE,MAAM,QAAQ,CAAC,IAAI,EAAE;gBAC9B,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;aACtC,CAAC,CAAA;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;QACb,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAA;YAC5B,YAAY,CAAC,KAAK,CAAC,CAAA;QACrB,CAAC;IACH,CAAC;IAED,YAAY,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE;QAC7B,KAAK,CAAC,YAAY,CAAC;YACjB,KAAK;YACL,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAvFkB;IAAhB,KAAK,CAAC,QAAQ,CAAC;8BAAc,gBAAgB;kDAAA;AACrB;IAAxB,KAAK,CAAC,gBAAgB,CAAC;8BAAU,gBAAgB;8CAAA;AAFvC,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAwF1B","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@material/web/button/text-button.js'\n\nimport '@operato/i18n/ox-i18n.js'\nimport '../../components/profile-component'\n\nimport { html } from 'lit'\nimport { customElement, query } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\n\nimport { AbstractAuthPage } from '../../components/abstract-auth-page'\n\n@customElement('forgot-password')\nexport class ForgotPassword extends AbstractAuthPage {\n @query('#email') emailInput!: HTMLInputElement\n @query('#submit-button') button!: HTMLInputElement\n\n get pageName() {\n return 'forgot password'\n }\n\n get actionUrl() {\n return '/auth/forgot-password'\n }\n\n get formfields() {\n const email = this.data?.email || ''\n\n return html`\n <div class=\"field\">\n <md-filled-text-field\n name=\"email\"\n type=\"email\"\n label=${String(i18next.t('label.email'))}\n .value=${email}\n required\n @input=${(e: Event) => {\n const target = e.target as HTMLInputElement\n if (target.validity.typeMismatch) {\n target.setCustomValidity(i18next.t('text.invalid-email'))\n } else {\n target.setCustomValidity('')\n }\n }}\n ></md-filled-text-field>\n </div>\n <md-elevated-button id=\"submit-button\" class=\"ui button\" type=\"submit\" @click=${e => this._onSubmit(e)}>\n <ox-i18n msgid=\"button.submit\"></ox-i18n>\n </md-elevated-button>\n `\n }\n\n get links() {\n return html`\n <a class=\"link\" href=\"/auth/signin\">\n <md-text-button><ox-i18n msgid=\"field.sign in\"></ox-i18n></md-text-button>\n </a>\n `\n }\n\n async submit() {\n var timer\n var formData = new FormData(this.formEl)\n\n try {\n var controller = new AbortController()\n var signal = controller.signal\n\n this.button.disabled = true\n timer = setTimeout(() => {\n controller.abort()\n throw new Error('timeout')\n }, 30 * 1000)\n\n var response = await fetch('/auth/forgot-password', {\n credentials: 'include',\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(Object.fromEntries(formData.entries())),\n signal\n })\n\n this.showSnackbar({\n message: await response.text(),\n level: response.ok ? 'info' : 'error'\n })\n } catch (e) {\n } finally {\n this.button.disabled = false\n clearTimeout(timer)\n }\n }\n\n showSnackbar({ message, level }) {\n super.showSnackbar({\n level,\n message\n })\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"reset-password.js","sourceRoot":"","sources":["../../../client/entries/auth/reset-password.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAGzE,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qBAAqB;IACtD,IAAI,QAAQ;QACV,OAAO,gBAAgB,CAAA;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,sBAAsB,CAAA;IAC/B,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,uBAAuB,CAAA;IAChC,CAAC;IAED,IAAI,KAAK;QACP,OAAO,gBAAgB,CAAA;IACzB,CAAC;CACF,CAAA;AAhBY,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAgBzB;SAhBY,aAAa","sourcesContent":["import { customElement } from 'lit/decorators.js'\n\nimport { AbstractPasswordReset } from '../../components/abstract-password-reset'\n\n@customElement('reset-password')\nexport class ResetPassword extends AbstractPasswordReset {\n get pageName() {\n return 'reset password'\n }\n\n get actionUrl() {\n return '/auth/reset-password'\n }\n\n get submitButtonLabel() {\n return 'label.change password'\n }\n\n get title() {\n return 'reset password'\n }\n}\n"]}
1
+ {"version":3,"file":"reset-password.js","sourceRoot":"","sources":["../../../client/entries/auth/reset-password.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAGzE,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qBAAqB;IACtD,IAAI,QAAQ;QACV,OAAO,gBAAgB,CAAA;IACzB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,sBAAsB,CAAA;IAC/B,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,uBAAuB,CAAA;IAChC,CAAC;IAED,IAAI,KAAK;QACP,OAAO,gBAAgB,CAAA;IACzB,CAAC;CACF,CAAA;AAhBY,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CAgBzB","sourcesContent":["import { customElement } from 'lit/decorators.js'\n\nimport { AbstractPasswordReset } from '../../components/abstract-password-reset'\n\n@customElement('reset-password')\nexport class ResetPassword extends AbstractPasswordReset {\n get pageName() {\n return 'reset password'\n }\n\n get actionUrl() {\n return '/auth/reset-password'\n }\n\n get submitButtonLabel() {\n return 'label.change password'\n }\n\n get title() {\n return 'reset password'\n }\n}\n"]}
@@ -10,11 +10,11 @@ export declare class AuthResult extends AuthResult_base {
10
10
  resultType?: string;
11
11
  private _applicationMeta?;
12
12
  updated(changed: any): void;
13
- render(): import("lit").TemplateResult<1>;
13
+ render(): import("lit-html").TemplateResult<1>;
14
14
  get applicationMeta(): {
15
- icon?: string | undefined;
16
- title?: string | undefined;
17
- description?: string | undefined;
15
+ icon?: string;
16
+ title?: string;
17
+ description?: string;
18
18
  };
19
19
  }
20
20
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"result.js","sourceRoot":"","sources":["../../../client/entries/auth/result.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,wBAAwB,CAAA;AAC/B,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAGlC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAqH3D,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAA;YAChC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,iBAAiB,CAAA;SAC5D;IACH,CAAC;IAED,MAAM;QACJ,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,eAAe,CAAA;QAEvD,OAAO,IAAI,CAAA;yBACU,IAAI,CAAC,UAAU;;qBAEnB,IAAI;iCACQ,KAAK;sCACA,WAAW;;;;gBAIjC,IAAI,CAAC,OAAO,IAAI,EAAE;;;;;;;qBAOb,CAAC,CAAC,EAAE;YACX,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;QACzC,CAAC;;;cAGC,OAAO,CAA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AlLY,UAAU","sourcesContent":["import '@material/web/button/elevated-button.js'\n\nimport '@operato/lottie-player'\nimport '../../components/profile-component'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { isSafari } from '@operato/utils'\n\n@customElement('auth-result')\nexport class AuthResult extends localize(i18next)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n width: 100vw;\n height: 100vh;\n height: 100dvh;\n background-color: var(--auth-background, var(--md-sys-color-primary));\n }\n .wrap {\n display: block;\n width: 450px;\n min-width: 350px;\n margin: 0 auto;\n text-align: center;\n }\n .auth-brand {\n color: #fff;\n }\n .auth-brand img {\n margin: 15% auto 5px auto;\n width: 100px;\n border: 3px solid var(--md-sys-color-on-primary);\n border-radius: 25px;\n box-shadow: var(--box-shadow);\n }\n .name {\n display: block;\n font: var(--auth-brand-name);\n text-shadow: var(--auth-brand-name-shadow);\n }\n h1 {\n margin: 50px 0 0 0;\n padding: 0;\n font-size: 24px;\n color: var(--auth-title-color, var(--md-sys-color-on-primary));\n }\n p {\n margin: 0;\n padding: var(--auth-description-padding);\n font: var(--auth-description-font);\n color: var(--auth-description-color, var(--md-sys-color-on-secondary));\n }\n :host *:focus {\n outline: none;\n }\n .user {\n background: url(/assets/images/icon-profile.png) center top no-repeat;\n margin: var(--profile-icon-margin);\n padding: 180px 20px 20px 20px;\n color: var(--md-sys-color-secondary);\n font: var(--header-bar-title);\n text-align: center;\n }\n\n label {\n font: bold 14px var(--theme-font);\n color: var(--md-sys-color-primary);\n }\n #button-area {\n border-top: 1px dashed rgba(0, 0, 0, 0.1);\n padding-top: 10px;\n }\n md-elevated-button {\n --md-theme-primary: var(--auth-button-background-color);\n --md-theme-on-primary: var(--md-sys-color-primary);\n --md-button-horizontal-padding: var(--padding-default);\n --md-button-ink-color: var(--md-sys-color-primary);\n }\n .lottie-container {\n width: 100%;\n height: 300px;\n position: absolute;\n left: 0;\n bottom: 0;\n pointer-events: none;\n }\n .lottie-container lottie-player {\n position: absolute;\n bottom: -6%;\n width: 100%;\n height: auto;\n }\n\n @media (max-width: 450px) {\n .wrap {\n width: 85%;\n min-width: 320px;\n padding-bottom: 100px;\n }\n .auth-form {\n grid-template-columns: 1fr;\n }\n .auth-brand img {\n margin: 12% auto 5px auto;\n width: 75px;\n }\n .lottie-container {\n overflow: hidden;\n height: 200px;\n pointer-events: none;\n }\n .lottie-container lottie-player {\n width: 1200px;\n left: -30%;\n }\n }\n `\n ]\n\n @property({ type: Object }) data: any\n @property({ type: String }) message?: string\n @property({ type: String }) resultType?: string\n\n private _applicationMeta?: { icon?: string; title?: string; description?: string }\n\n updated(changed) {\n if (changed.has('data')) {\n this.message = this.data.message\n this.resultType = this.data.resultType || 'congratulations'\n }\n }\n\n render() {\n var { icon, title, description } = this.applicationMeta\n\n return html`\n <div class=\"wrap ${this.resultType}\">\n <div class=\"auth-brand\">\n <img src=${icon} />\n <strong class=\"name\">${title}</strong>\n <span class=\"welcome-msg\">${description}</span>\n </div>\n\n <div id=\"message-area\">\n <h1>${this.message || ''}</h1>\n\n <!--description message container-->\n <p></p>\n </div>\n <div id=\"button-area\">\n <md-elevated-button\n @click=${e => {\n window.location.replace('/auth/signin')\n }}\n >\n <md-icon slot=\"icon\">home</md-icon>\n ${i18next.t('button.go to home')}\n </md-elevated-button>\n </div>\n\n ${isSafari()\n ? html``\n : html`\n <div class=\"lottie-container\">\n <lottie-player autoplay loop src=\"../../assets/images/background-animation.json\"></lottie-player>\n </div>\n `}\n </div>\n `\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"]}
1
+ {"version":3,"file":"result.js","sourceRoot":"","sources":["../../../client/entries/auth/result.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,wBAAwB,CAAA;AAC/B,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAGlC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAqH3D,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAA;YAChC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,iBAAiB,CAAA;QAC7D,CAAC;IACH,CAAC;IAED,MAAM;QACJ,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC,eAAe,CAAA;QAEvD,OAAO,IAAI,CAAA;yBACU,IAAI,CAAC,UAAU;;qBAEnB,IAAI;iCACQ,KAAK;sCACA,WAAW;;;;gBAIjC,IAAI,CAAC,OAAO,IAAI,EAAE;;;;;;;qBAOb,CAAC,CAAC,EAAE;YACX,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;QACzC,CAAC;;;cAGC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;;;;UAIlC,QAAQ,EAAE;YACV,CAAC,CAAC,IAAI,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nimport '../../components/profile-component'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { isSafari } from '@operato/utils'\n\n@customElement('auth-result')\nexport class AuthResult extends localize(i18next)(LitElement) {\n static styles = [\n css`\n :host {\n display: flex;\n width: 100vw;\n height: 100vh;\n height: 100dvh;\n background-color: var(--auth-background, var(--md-sys-color-primary));\n }\n .wrap {\n display: block;\n width: 450px;\n min-width: 350px;\n margin: 0 auto;\n text-align: center;\n }\n .auth-brand {\n color: #fff;\n }\n .auth-brand img {\n margin: 15% auto 5px auto;\n width: 100px;\n border: 3px solid var(--md-sys-color-on-primary);\n border-radius: 25px;\n box-shadow: var(--box-shadow);\n }\n .name {\n display: block;\n font: var(--auth-brand-name);\n text-shadow: var(--auth-brand-name-shadow);\n }\n h1 {\n margin: 50px 0 0 0;\n padding: 0;\n font-size: 24px;\n color: var(--auth-title-color, var(--md-sys-color-on-primary));\n }\n p {\n margin: 0;\n padding: var(--auth-description-padding);\n font: var(--auth-description-font);\n color: var(--auth-description-color, var(--md-sys-color-on-secondary));\n }\n :host *:focus {\n outline: none;\n }\n .user {\n background: url(/assets/images/icon-profile.png) center top no-repeat;\n margin: var(--profile-icon-margin);\n padding: 180px 20px 20px 20px;\n color: var(--md-sys-color-secondary);\n font: var(--header-bar-title);\n text-align: center;\n }\n\n label {\n font: bold 14px var(--theme-font);\n color: var(--md-sys-color-primary);\n }\n #button-area {\n border-top: 1px dashed rgba(0, 0, 0, 0.1);\n padding-top: 10px;\n }\n md-elevated-button {\n --md-theme-primary: var(--auth-button-background-color);\n --md-theme-on-primary: var(--md-sys-color-primary);\n --md-button-horizontal-padding: var(--padding-default);\n --md-button-ink-color: var(--md-sys-color-primary);\n }\n .lottie-container {\n width: 100%;\n height: 300px;\n position: absolute;\n left: 0;\n bottom: 0;\n pointer-events: none;\n }\n .lottie-container lottie-player {\n position: absolute;\n bottom: -6%;\n width: 100%;\n height: auto;\n }\n\n @media (max-width: 450px) {\n .wrap {\n width: 85%;\n min-width: 320px;\n padding-bottom: 100px;\n }\n .auth-form {\n grid-template-columns: 1fr;\n }\n .auth-brand img {\n margin: 12% auto 5px auto;\n width: 75px;\n }\n .lottie-container {\n overflow: hidden;\n height: 200px;\n pointer-events: none;\n }\n .lottie-container lottie-player {\n width: 1200px;\n left: -30%;\n }\n }\n `\n ]\n\n @property({ type: Object }) data: any\n @property({ type: String }) message?: string\n @property({ type: String }) resultType?: string\n\n private _applicationMeta?: { icon?: string; title?: string; description?: string }\n\n updated(changed) {\n if (changed.has('data')) {\n this.message = this.data.message\n this.resultType = this.data.resultType || 'congratulations'\n }\n }\n\n render() {\n var { icon, title, description } = this.applicationMeta\n\n return html`\n <div class=\"wrap ${this.resultType}\">\n <div class=\"auth-brand\">\n <img src=${icon} />\n <strong class=\"name\">${title}</strong>\n <span class=\"welcome-msg\">${description}</span>\n </div>\n\n <div id=\"message-area\">\n <h1>${this.message || ''}</h1>\n\n <!--description message container-->\n <p></p>\n </div>\n <div id=\"button-area\">\n <md-elevated-button\n @click=${e => {\n window.location.replace('/auth/signin')\n }}\n >\n <md-icon slot=\"icon\">home</md-icon>\n ${i18next.t('button.go to home')}\n </md-elevated-button>\n </div>\n\n ${isSafari()\n ? html``\n : html`\n <div class=\"lottie-container\">\n <lottie-player autoplay loop src=\"../../assets/images/background-animation.json\"></lottie-player>\n </div>\n `}\n </div>\n `\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"signin.js","sourceRoot":"","sources":["../../../client/entries/auth/signin.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAGtD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,YAAY;IAC1C,IAAI,QAAQ;QACV,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,cAAc,CAAA;IACvB,CAAC;CACF,CAAA;AARY,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAQtB;SARY,UAAU","sourcesContent":["import { customElement } from 'lit/decorators.js'\n\nimport { AbstractSign } from '../../components/abstract-sign'\n\n@customElement('auth-signin')\nexport class AuthSignin extends AbstractSign {\n get pageName() {\n return 'sign in'\n }\n\n get actionUrl() {\n return '/auth/signin'\n }\n}\n"]}
1
+ {"version":3,"file":"signin.js","sourceRoot":"","sources":["../../../client/entries/auth/signin.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAGtD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,YAAY;IAC1C,IAAI,QAAQ;QACV,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,cAAc,CAAA;IACvB,CAAC;CACF,CAAA;AARY,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAQtB","sourcesContent":["import { customElement } from 'lit/decorators.js'\n\nimport { AbstractSign } from '../../components/abstract-sign'\n\n@customElement('auth-signin')\nexport class AuthSignin extends AbstractSign {\n get pageName() {\n return 'sign in'\n }\n\n get actionUrl() {\n return '/auth/signin'\n }\n}\n"]}
@@ -6,7 +6,7 @@ export declare class AuthSignup extends AbstractSign {
6
6
  get pageName(): string;
7
7
  get actionUrl(): string;
8
8
  confirmPass: HTMLInputElement;
9
- get formfields(): import("lit").TemplateResult<1>;
9
+ get formfields(): import("lit-html").TemplateResult<1>;
10
10
  languageUpdated(): void;
11
- get links(): import("lit").TemplateResult<1>;
11
+ get links(): import("lit-html").TemplateResult<1>;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"signup.js","sourceRoot":"","sources":["../../../client/entries/auth/signup.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAG/F,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,YAAY;IAI1C,IAAI,QAAQ;QACV,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,cAAc,CAAA;IACvB,CAAC;IAID,IAAI,UAAU;QACZ,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAA;QAEjD,gDAAgD;QAChD,yEAAyE;QAEzE,OAAO,IAAI,CAAA;;;;;kBAKG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;mBAC9B,IAAI;;;;;;;;kBAQL,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;;mBAE/B,KAAK;;mBAEL,CAAC,CAAQ,EAAE,EAAE;YACpB,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAA;YAC3C,IAAI,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE;gBACh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n\nimport { i18next } from '@operato/i18n'\n\nimport { AbstractSign } from '../../components/abstract-sign'\nimport { generatePasswordPatternHelp, generatePasswordPatternRegExp } from '../../utils/password-rule'\n\n@customElement('auth-signup')\nexport class AuthSignup extends AbstractSign {\n private passwordPattern?: string\n private passwordHelp?: string\n\n get pageName() {\n return 'sign up'\n }\n\n get actionUrl() {\n return '/auth/signup'\n }\n\n @query('#confirm-password') confirmPass!: HTMLInputElement\n\n get formfields() {\n const { name = '', email = '' } = this.data || {}\n\n // .validationMessage=${this.passwordHelp || ''}\n // .validationMessage=${String(i18next.t('text.passwords do not match'))}\n\n return html`\n <div class=\"field\">\n <md-filled-text-field\n name=\"name\"\n type=\"text\"\n label=${String(i18next.t('field.name'))}\n .value=${name}\n required\n ></md-filled-text-field>\n </div>\n <div class=\"field\">\n <md-filled-text-field\n name=\"email\"\n type=\"email\"\n label=${String(i18next.t('field.email'))}\n required\n .value=${email}\n autocapitalize=\"off\"\n @input=${(e: Event) => {\n const target = e.target as HTMLInputElement\n if (target.validity.typeMismatch) {\n target.setCustomValidity(i18next.t('text.invalid-email'))\n } else {\n target.setCustomValidity('')\n }\n }}\n ><md-icon slot=\"leading-icon\">mail</md-icon></md-filled-text-field\n >\n </div>\n <div class=\"field\">\n <md-filled-text-field\n name=\"password\"\n type=\"password\"\n label=${String(i18next.t('field.password'))}\n .pattern=${this.passwordPattern || ''}\n helper=${this.passwordHelp || ''}\n helperPersistent\n required\n @input=${e => {\n var val = e.target.value\n this.confirmPass.setAttribute('pattern', val.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '[$&]'))\n }}\n >\n ></md-filled-text-field\n >\n </div>\n <div class=\"field\">\n <md-filled-text-field\n id=\"confirm-password\"\n name=\"confirm-password\"\n type=\"password\"\n label=${String(i18next.t('field.confirm password'))}\n required\n >\n ></md-filled-text-field\n >\n </div>\n <md-elevated-button class=\"ui button\" @click=${e => this._onSubmit(e)}>\n <ox-i18n msgid=\"field.${this.pageName}\"></ox-i18n>\n </md-elevated-button>\n `\n }\n\n languageUpdated() {\n this.passwordPattern = generatePasswordPatternRegExp(this.data.passwordRule).source\n this.passwordHelp = generatePasswordPatternHelp(this.data.passwordRule)\n }\n\n get links() {\n return html`\n <a class=\"link\" href=\"/auth/signin\">\n <md-text-button><ox-i18n msgid=\"field.sign in\"></ox-i18n></md-text-button>\n </a>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"signup.js","sourceRoot":"","sources":["../../../client/entries/auth/signup.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAA;AAG/F,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,YAAY;IAI1C,IAAI,QAAQ;QACV,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,cAAc,CAAA;IACvB,CAAC;IAID,IAAI,UAAU;QACZ,MAAM,EAAE,IAAI,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAA;QAEjD,gDAAgD;QAChD,yEAAyE;QAEzE,OAAO,IAAI,CAAA;;;;;kBAKG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;mBAC9B,IAAI;;;;;;;;kBAQL,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;;mBAE/B,KAAK;;mBAEL,CAAC,CAAQ,EAAE,EAAE;YACpB,MAAM,MAAM,GAAG,CAAC,CAAC,MAA0B,CAAA;YAC3C,IAAI,MAAM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.js'\n\nimport { html } from 'lit'\nimport { customElement, query } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\n\nimport { AbstractSign } from '../../components/abstract-sign'\nimport { generatePasswordPatternHelp, generatePasswordPatternRegExp } from '../../utils/password-rule'\n\n@customElement('auth-signup')\nexport class AuthSignup extends AbstractSign {\n private passwordPattern?: string\n private passwordHelp?: string\n\n get pageName() {\n return 'sign up'\n }\n\n get actionUrl() {\n return '/auth/signup'\n }\n\n @query('#confirm-password') confirmPass!: HTMLInputElement\n\n get formfields() {\n const { name = '', email = '' } = this.data || {}\n\n // .validationMessage=${this.passwordHelp || ''}\n // .validationMessage=${String(i18next.t('text.passwords do not match'))}\n\n return html`\n <div class=\"field\">\n <md-filled-text-field\n name=\"name\"\n type=\"text\"\n label=${String(i18next.t('field.name'))}\n .value=${name}\n required\n ></md-filled-text-field>\n </div>\n <div class=\"field\">\n <md-filled-text-field\n name=\"email\"\n type=\"email\"\n label=${String(i18next.t('field.email'))}\n required\n .value=${email}\n autocapitalize=\"off\"\n @input=${(e: Event) => {\n const target = e.target as HTMLInputElement\n if (target.validity.typeMismatch) {\n target.setCustomValidity(i18next.t('text.invalid-email'))\n } else {\n target.setCustomValidity('')\n }\n }}\n ><md-icon slot=\"leading-icon\">mail</md-icon></md-filled-text-field\n >\n </div>\n <div class=\"field\">\n <md-filled-text-field\n name=\"password\"\n type=\"password\"\n label=${String(i18next.t('field.password'))}\n .pattern=${this.passwordPattern || ''}\n helper=${this.passwordHelp || ''}\n helperPersistent\n required\n @input=${e => {\n var val = e.target.value\n this.confirmPass.setAttribute('pattern', val.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '[$&]'))\n }}\n >\n ></md-filled-text-field\n >\n </div>\n <div class=\"field\">\n <md-filled-text-field\n id=\"confirm-password\"\n name=\"confirm-password\"\n type=\"password\"\n label=${String(i18next.t('field.confirm password'))}\n required\n >\n ></md-filled-text-field\n >\n </div>\n <md-elevated-button class=\"ui button\" @click=${e => this._onSubmit(e)}>\n <ox-i18n msgid=\"field.${this.pageName}\"></ox-i18n>\n </md-elevated-button>\n `\n }\n\n languageUpdated() {\n this.passwordPattern = generatePasswordPatternRegExp(this.data.passwordRule).source\n this.passwordHelp = generatePasswordPatternHelp(this.data.passwordRule)\n }\n\n get links() {\n return html`\n <a class=\"link\" href=\"/auth/signin\">\n <md-text-button><ox-i18n msgid=\"field.sign in\"></ox-i18n></md-text-button>\n </a>\n `\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"unlock-user.js","sourceRoot":"","sources":["../../../client/entries/auth/unlock-user.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAGzE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,qBAAqB;IACnD,IAAI,QAAQ;QACV,OAAO,aAAa,CAAA;IACtB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,mBAAmB,CAAA;IAC5B,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,sBAAsB,CAAA;IAC/B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,gBAAgB,CAAA;IACzB,CAAC;CACF,CAAA;AAhBY,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAgBtB;SAhBY,UAAU","sourcesContent":["import { customElement } from 'lit/decorators.js'\n\nimport { AbstractPasswordReset } from '../../components/abstract-password-reset'\n\n@customElement('unlock-user')\nexport class UnlockUser extends AbstractPasswordReset {\n get pageName() {\n return 'unlock user'\n }\n\n get actionUrl() {\n return '/auth/unlock-user'\n }\n\n get submitButtonLabel() {\n return 'label.unlock account'\n }\n\n get title() {\n return 'unlock account'\n }\n}\n"]}
1
+ {"version":3,"file":"unlock-user.js","sourceRoot":"","sources":["../../../client/entries/auth/unlock-user.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAGzE,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,qBAAqB;IACnD,IAAI,QAAQ;QACV,OAAO,aAAa,CAAA;IACtB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,mBAAmB,CAAA;IAC5B,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,sBAAsB,CAAA;IAC/B,CAAC;IAED,IAAI,KAAK;QACP,OAAO,gBAAgB,CAAA;IACzB,CAAC;CACF,CAAA;AAhBY,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAgBtB","sourcesContent":["import { customElement } from 'lit/decorators.js'\n\nimport { AbstractPasswordReset } from '../../components/abstract-password-reset'\n\n@customElement('unlock-user')\nexport class UnlockUser extends AbstractPasswordReset {\n get pageName() {\n return 'unlock user'\n }\n\n get actionUrl() {\n return '/auth/unlock-user'\n }\n\n get submitButtonLabel() {\n return 'label.unlock account'\n }\n\n get title() {\n return 'unlock account'\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth2-decision-error-page.js","sourceRoot":"","sources":["../../../client/entries/oauth2/oauth2-decision-error-page.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG3D,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,UAAU;IAAhD;;QAC8B,SAAI,GAAQ,EAAE,CAAA;QACd,SAAI,GAAQ,EAAE,CAAA;QACd,WAAM,GAAQ,EAAE,CAAA;QAChB,QAAG,GAAQ,EAAE,CAAA;QACb,gBAAW,GAAW,EAAE,CAAA;QACxB,kBAAa,GAAW,EAAE,CAAA;IAqCxD,CAAC;IAnCC,MAAM;QACJ,OAAO,IAAI,CAAA;;;cA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;qDAAe;AAC1C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAe;AAC1C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAiB;AAC5C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAAc;AACzC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;4DAAyB;AACpD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8DAA2B;AANlD,uBAAuB;IAD5B,aAAa,CAAC,uBAAuB,CAAC;GACjC,uBAAuB,CA2C5B","sourcesContent":["import '@material/web/button/elevated-button.js'\n\nimport { html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('oauth2-decision-error')\nclass OAuth2DecisionErrorPage extends LitElement {\n @property({ type: Object }) data: any = {}\n @property({ type: Object }) user: any = {}\n @property({ type: Object }) domain: any = {}\n @property({ type: Object }) req: any = {}\n @property({ type: String }) redirectURI: string = ''\n @property({ type: String }) transactionID: string = ''\n\n render() {\n return html`\n <h2>Application Binding Error</h2>\n\n <p>Hi ${this.user.name}!</p>\n <p><b>Application Not Found</b></p>\n <p>You better check you give a correct client id (appKey)</p>\n\n <p>Company: ${this.domain.subdomain}</p>\n <p>Application Client ID : ${this.req.clientID}</p>\n <p>Redirect URI : ${this.redirectURI}</p>\n <p>State : ${this.req.state}</p>\n\n <form>\n <input name=\"transaction_id\" value=\"${this.transactionID}\" hidden />\n <input name=\"subdomain\" type=\"text\" value=\"${this.domain.subdomain}\" hidden />\n <input name=\"appKey\" value=\"${this.req.clientID}\" hidden />\n <input name=\"scope\" value=\"${this.req.scope}\" hidden />\n <input name=\"state\" type=\"text\" value=\"${this.req.state}\" hidden />\n <input name=\"email\" type=\"text\" value=\"${this.user.email}\" hidden />\n\n <md-elevated-button raised @click=\"${() => history.back()}\">Move back</md-elevated-button>\n </form>\n `\n }\n\n updated(changedProps) {\n if (changedProps.has('data')) {\n this.user = this.data?.oauth2?.user || this.user\n this.domain = this.data?.domain || this.domain\n this.req = this.data?.oauth2?.req || this.req\n this.redirectURI = this.data?.oauth2?.redirectURI || this.redirectURI\n this.transactionID = this.data?.oauth2?.transactionID || this.transactionID\n }\n }\n}\n"]}
1
+ {"version":3,"file":"oauth2-decision-error-page.js","sourceRoot":"","sources":["../../../client/entries/oauth2/oauth2-decision-error-page.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAG3D,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,UAAU;IAAhD;;QAC8B,SAAI,GAAQ,EAAE,CAAA;QACd,SAAI,GAAQ,EAAE,CAAA;QACd,WAAM,GAAQ,EAAE,CAAA;QAChB,QAAG,GAAQ,EAAE,CAAA;QACb,gBAAW,GAAW,EAAE,CAAA;QACxB,kBAAa,GAAW,EAAE,CAAA;IAqCxD,CAAC;IAnCC,MAAM;QACJ,OAAO,IAAI,CAAA;;;cAGD,IAAI,CAAC,IAAI,CAAC,IAAI;;;;oBAIR,IAAI,CAAC,MAAM,CAAC,SAAS;mCACN,IAAI,CAAC,GAAG,CAAC,QAAQ;0BAC1B,IAAI,CAAC,WAAW;mBACvB,IAAI,CAAC,GAAG,CAAC,KAAK;;;8CAGa,IAAI,CAAC,aAAa;qDACX,IAAI,CAAC,MAAM,CAAC,SAAS;sCACpC,IAAI,CAAC,GAAG,CAAC,QAAQ;qCAClB,IAAI,CAAC,GAAG,CAAC,KAAK;iDACF,IAAI,CAAC,GAAG,CAAC,KAAK;iDACd,IAAI,CAAC,IAAI,CAAC,KAAK;;6CAEnB,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE;;KAE5D,CAAA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esContent":["import '@material/web/button/elevated-button.js'\n\nimport { html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('oauth2-decision-error')\nclass OAuth2DecisionErrorPage extends LitElement {\n @property({ type: Object }) data: any = {}\n @property({ type: Object }) user: any = {}\n @property({ type: Object }) domain: any = {}\n @property({ type: Object }) req: any = {}\n @property({ type: String }) redirectURI: string = ''\n @property({ type: String }) transactionID: string = ''\n\n render() {\n return html`\n <h2>Application Binding Error</h2>\n\n <p>Hi ${this.user.name}!</p>\n <p><b>Application Not Found</b></p>\n <p>You better check you give a correct client id (appKey)</p>\n\n <p>Company: ${this.domain.subdomain}</p>\n <p>Application Client ID : ${this.req.clientID}</p>\n <p>Redirect URI : ${this.redirectURI}</p>\n <p>State : ${this.req.state}</p>\n\n <form>\n <input name=\"transaction_id\" value=\"${this.transactionID}\" hidden />\n <input name=\"subdomain\" type=\"text\" value=\"${this.domain.subdomain}\" hidden />\n <input name=\"appKey\" value=\"${this.req.clientID}\" hidden />\n <input name=\"scope\" value=\"${this.req.scope}\" hidden />\n <input name=\"state\" type=\"text\" value=\"${this.req.state}\" hidden />\n <input name=\"email\" type=\"text\" value=\"${this.user.email}\" hidden />\n\n <md-elevated-button raised @click=\"${() => history.back()}\">Move back</md-elevated-button>\n </form>\n `\n }\n\n updated(changedProps) {\n if (changedProps.has('data')) {\n this.user = this.data?.oauth2?.user || this.user\n this.domain = this.data?.domain || this.domain\n this.req = this.data?.oauth2?.req || this.req\n this.redirectURI = this.data?.oauth2?.redirectURI || this.redirectURI\n this.transactionID = this.data?.oauth2?.transactionID || this.transactionID\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"oauth2-decision-page.js","sourceRoot":"","sources":["../../../client/entries/oauth2/oauth2-decision-page.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,gCAAgC,CAAA;AAEvC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,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CAAC,UAAU,EAAE;YACvB,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAA;SAC7B;IACH,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAA;IAC1C,CAAC;;AAxLM,yBAAM,GAAG;IACd,qBAAqB;IACrB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmDF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAe;AAC1C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAe;AAC1C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDAAiB;AAC5C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDAAiB;AAC5C;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CAAc;AACzC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAyB;AACpD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yDAA2B;AACtD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;iDAAkB;AAE5C;IAAC,KAAK,CAAC,eAAe,CAAC;;wDAA4D;AAlE/E,kBAAkB;IADvB,aAAa,CAAC,iBAAiB,CAAC;GAC3B,kBAAkB,CA0LvB","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '../../components/role-selector'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\nimport { ButtonContainerStyles } from '@operato/styles'\n\n@customElement('oauth2-decision')\nclass OAuth2DecisionPage extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n border: 1px solid var(--md-sys-color-primary);\n margin: var(--margin-default);\n padding: var(--padding-default);\n font: normal 15px var(--theme-font);\n color: var(--md-sys-color-secondary);\n }\n\n [field-2column] {\n border-radius: var(--border-radius);\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 5px 15px;\n clear: both;\n max-width: var(--input-container-max-width);\n }\n\n [field] {\n display: flex;\n flex-direction: column;\n padding-bottom: var(--padding-default);\n }\n\n input {\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 label {\n display: flex;\n flex-direction: column;\n font: var(--label-font);\n color: var(--label-color, var(--md-sys-color-on-surface));\n text-transform: var(--label-text-transform);\n }\n\n md-elevated-button {\n margin-right: var(--padding-narrow);\n }\n\n [danger] {\n --md-theme-primary: var(--md-danger-button-primary-color);\n }\n `\n ]\n\n @property({ type: Object }) data: any = {}\n @property({ type: Object }) user: any = {}\n @property({ type: Object }) client: any = {}\n @property({ type: Object }) domain: any = {}\n @property({ type: Object }) req: any = {}\n @property({ type: String }) redirectURI: string = ''\n @property({ type: String }) transactionID: string = ''\n @property({ type: Array }) roles: any[] = []\n\n @query('role-selector') roleSelector!: HTMLElement & { selectedRoles: () => any[] }\n\n render() {\n return html`\n <h2>Application Binding</h2>\n <p>Hi ${this.user.name}!</p>\n <p><b> ${this.client.name} </b> is requesting access to your account.</p>\n <p>Do you approve?</p>\n\n <form field-2column>\n <div field>\n <label\n >${i18next.t('label.company')}\n <input readonly value=\"${this.domain.subdomain}\" />\n </label>\n\n <label\n >${i18next.t('label.client-id')}\n <input readonly value=\"${this.req.clientID}\" />\n </label>\n </div>\n\n <div field>\n <label\n >${i18next.t('label.redirect_uri')}\n <input readonly value=\"${this.redirectURI}\" />\n </label>\n\n <label\n >${i18next.t('label.state')}\n <input readonly value=\"${this.req.state}\" />\n </label>\n </div>\n </form>\n\n <role-selector .roleCategory=\"${this.domain.name}\" .roles=\"${this.roles}\"></role-selector>\n\n <div class=\"button-container\">\n <md-elevated-button @click=\"${() => this.decision(true)}\" raised label=\"Allow\"></md-elevated-button>\n <md-elevated-button @click=\"${() => this.decision(false)}\" raised danger label=\"Deny\"></md-elevated-button>\n </div>\n `\n }\n\n async firstUpdated() {\n this.fetchMyRoles()\n }\n\n updated(changedProps) {\n if (changedProps.has('data')) {\n this.user = this.data?.oauth2?.user || this.user\n this.client = this.data?.oauth2?.client || this.client\n this.domain = this.data?.domain || this.domain\n this.req = this.data?.oauth2?.req || this.req\n this.redirectURI = this.data?.oauth2?.redirectURI || this.redirectURI\n this.transactionID = this.data?.oauth2?.transactionID || this.transactionID\n }\n }\n\n async fetchMyRoles() {\n const response = await client.query({\n query: gql`\n query myRoles {\n myRoles {\n id\n name\n description\n }\n }\n `\n })\n\n if (!response.errors?.length) {\n this.roles = response.data.myRoles\n }\n }\n\n async decision(allowOrCancel) {\n const selectedRoles = this.selectedRoles()\n if (allowOrCancel && !selectedRoles?.length) {\n await OxPrompt.open({\n title: i18next.t('title.nothing selected'),\n text: i18next.t('text.should select at least one of x', { x: i18next.t('label.role') }),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n\n return\n }\n\n let data: any = {\n transaction_id: this.transactionID,\n subdomain: this.domain.subdomain,\n appKey: this.req.clientID,\n state: this.req.state,\n email: this.user.email,\n scopes: selectedRoles\n }\n if (!allowOrCancel) {\n data.cancel = 'Deny'\n }\n\n const response = await fetch('/oauth/decision', {\n method: 'POST',\n mode: 'cors',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json'\n },\n redirect: 'follow',\n body: JSON.stringify(data)\n })\n\n if (response.redirected) {\n location.href = response.url\n }\n }\n\n selectedRoles() {\n return this.roleSelector.selectedRoles()\n }\n}\n"]}
1
+ {"version":3,"file":"oauth2-decision-page.js","sourceRoot":"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ent":["import '@material/web/button/elevated-button.js'\nimport '../../components/role-selector'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\nimport { ButtonContainerStyles } from '@operato/styles'\n\n@customElement('oauth2-decision')\nclass OAuth2DecisionPage extends LitElement {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n border: 1px solid var(--md-sys-color-primary);\n margin: var(--margin-default);\n padding: var(--padding-default);\n font: normal 15px var(--theme-font);\n color: var(--md-sys-color-secondary);\n }\n\n [field-2column] {\n border-radius: var(--border-radius);\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 5px 15px;\n clear: both;\n max-width: var(--input-container-max-width);\n }\n\n [field] {\n display: flex;\n flex-direction: column;\n padding-bottom: var(--padding-default);\n }\n\n input {\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 label {\n display: flex;\n flex-direction: column;\n font: var(--label-font);\n color: var(--label-color, var(--md-sys-color-on-surface));\n text-transform: var(--label-text-transform);\n }\n\n md-elevated-button {\n margin-right: var(--padding-narrow);\n }\n\n [danger] {\n --md-theme-primary: var(--md-danger-button-primary-color);\n }\n `\n ]\n\n @property({ type: Object }) data: any = {}\n @property({ type: Object }) user: any = {}\n @property({ type: Object }) client: any = {}\n @property({ type: Object }) domain: any = {}\n @property({ type: Object }) req: any = {}\n @property({ type: String }) redirectURI: string = ''\n @property({ type: String }) transactionID: string = ''\n @property({ type: Array }) roles: any[] = []\n\n @query('role-selector') roleSelector!: HTMLElement & { selectedRoles: () => any[] }\n\n render() {\n return html`\n <h2>Application Binding</h2>\n <p>Hi ${this.user.name}!</p>\n <p><b> ${this.client.name} </b> is requesting access to your account.</p>\n <p>Do you approve?</p>\n\n <form field-2column>\n <div field>\n <label\n >${i18next.t('label.company')}\n <input readonly value=\"${this.domain.subdomain}\" />\n </label>\n\n <label\n >${i18next.t('label.client-id')}\n <input readonly value=\"${this.req.clientID}\" />\n </label>\n </div>\n\n <div field>\n <label\n >${i18next.t('label.redirect_uri')}\n <input readonly value=\"${this.redirectURI}\" />\n </label>\n\n <label\n >${i18next.t('label.state')}\n <input readonly value=\"${this.req.state}\" />\n </label>\n </div>\n </form>\n\n <role-selector .roleCategory=\"${this.domain.name}\" .roles=\"${this.roles}\"></role-selector>\n\n <div class=\"button-container\">\n <md-elevated-button @click=\"${() => this.decision(true)}\" raised label=\"Allow\"></md-elevated-button>\n <md-elevated-button @click=\"${() => this.decision(false)}\" raised danger label=\"Deny\"></md-elevated-button>\n </div>\n `\n }\n\n async firstUpdated() {\n this.fetchMyRoles()\n }\n\n updated(changedProps) {\n if (changedProps.has('data')) {\n this.user = this.data?.oauth2?.user || this.user\n this.client = this.data?.oauth2?.client || this.client\n this.domain = this.data?.domain || this.domain\n this.req = this.data?.oauth2?.req || this.req\n this.redirectURI = this.data?.oauth2?.redirectURI || this.redirectURI\n this.transactionID = this.data?.oauth2?.transactionID || this.transactionID\n }\n }\n\n async fetchMyRoles() {\n const response = await client.query({\n query: gql`\n query myRoles {\n myRoles {\n id\n name\n description\n }\n }\n `\n })\n\n if (!response.errors?.length) {\n this.roles = response.data.myRoles\n }\n }\n\n async decision(allowOrCancel) {\n const selectedRoles = this.selectedRoles()\n if (allowOrCancel && !selectedRoles?.length) {\n await OxPrompt.open({\n title: i18next.t('title.nothing selected'),\n text: i18next.t('text.should select at least one of x', { x: i18next.t('label.role') }),\n confirmButton: { text: i18next.t('button.confirm') }\n })\n\n return\n }\n\n let data: any = {\n transaction_id: this.transactionID,\n subdomain: this.domain.subdomain,\n appKey: this.req.clientID,\n state: this.req.state,\n email: this.user.email,\n scopes: selectedRoles\n }\n if (!allowOrCancel) {\n data.cancel = 'Deny'\n }\n\n const response = await fetch('/oauth/decision', {\n method: 'POST',\n mode: 'cors',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json'\n },\n redirect: 'follow',\n body: JSON.stringify(data)\n })\n\n if (response.redirected) {\n location.href = response.url\n }\n }\n\n selectedRoles() {\n return this.roleSelector.selectedRoles()\n }\n}\n"]}
@@ -9,13 +9,13 @@ export declare class HomePage extends HomePage_base {
9
9
  explanation1?: string;
10
10
  explanation2?: string;
11
11
  private _applicationMeta?;
12
- render(): import("lit").TemplateResult<1>;
12
+ render(): import("lit-html").TemplateResult<1>;
13
13
  firstInput: HTMLInputElement;
14
14
  firstUpdated(): void;
15
15
  get applicationMeta(): {
16
- icon?: string | undefined;
17
- title?: string | undefined;
18
- description?: string | undefined;
16
+ icon?: string;
17
+ title?: string;
18
+ description?: string;
19
19
  };
20
20
  }
21
21
  export {};