@things-factory/auth-ui 10.1.27 → 10.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/pages/app-binding/app-bindings.js +4 -11
- package/dist-client/pages/app-binding/app-bindings.js.map +1 -1
- package/dist-client/pages/appliance/home.js +4 -11
- package/dist-client/pages/appliance/home.js.map +1 -1
- package/dist-client/pages/application/applications.js +4 -11
- package/dist-client/pages/application/applications.js.map +1 -1
- package/dist-client/pages/attribute/attribute-set-management.js +6 -11
- package/dist-client/pages/attribute/attribute-set-management.js.map +1 -1
- package/dist-client/pages/auth-provider/auth-provider-management.js +6 -11
- package/dist-client/pages/auth-provider/auth-provider-management.js.map +1 -1
- package/dist-client/pages/domain/domain-management.js +5 -13
- package/dist-client/pages/domain/domain-management.js.map +1 -1
- package/dist-client/pages/domain-link/domain-link-management.js +6 -11
- package/dist-client/pages/domain-link/domain-link-management.js.map +1 -1
- package/dist-client/pages/domain-owner/domain-owner-management.js +4 -11
- package/dist-client/pages/domain-owner/domain-owner-management.js.map +1 -1
- package/dist-client/pages/env-var/env-var-list-page.js +5 -13
- package/dist-client/pages/env-var/env-var-list-page.js.map +1 -1
- package/dist-client/pages/partner/partner-management.js +7 -5
- package/dist-client/pages/partner/partner-management.js.map +1 -1
- package/dist-client/pages/profile.js +7 -12
- package/dist-client/pages/profile.js.map +1 -1
- package/dist-client/pages/role/role-list-page.js +4 -9
- package/dist-client/pages/role/role-list-page.js.map +1 -1
- package/dist-client/pages/role/role-privilege-page.d.ts +4 -1
- package/dist-client/pages/role/role-privilege-page.js +47 -26
- package/dist-client/pages/role/role-privilege-page.js.map +1 -1
- package/dist-client/pages/user/user-list-page.d.ts +22 -1
- package/dist-client/pages/user/user-list-page.js +81 -66
- package/dist-client/pages/user/user-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/tests/page-state.test.ts +49 -0
- package/translations/en.json +2 -0
- package/translations/ja.json +2 -0
- package/translations/ko.json +2 -0
- package/translations/ms.json +2 -0
- package/translations/zh.json +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/auth-ui",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.28",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@operato/p13n": "^10.0.0",
|
|
39
39
|
"@operato/popup": "^10.0.0",
|
|
40
40
|
"@operato/styles": "^10.0.0",
|
|
41
|
-
"@things-factory/auth-base": "^10.1.
|
|
42
|
-
"@things-factory/more-base": "^10.1.
|
|
41
|
+
"@things-factory/auth-base": "^10.1.28",
|
|
42
|
+
"@things-factory/more-base": "^10.1.28",
|
|
43
43
|
"base64url": "^3.0.1",
|
|
44
44
|
"clipboard": "^2.0.6"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "3a260a0f79bc6b41a692a103955bfcc541aff60e"
|
|
47
47
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { readFileSync } from 'fs'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A screen says what it is doing, and a refusal is not a breakage (ADR-0060 decision 8).
|
|
6
|
+
*
|
|
7
|
+
* Role privileges drew one note for everything that could go wrong - "failed to fetch, please try
|
|
8
|
+
* again" - with no sentence from the server, no way to read it again, and nothing to tell a
|
|
9
|
+
* privilege refusal from a server that was down. It is the screen a person is most likely to be
|
|
10
|
+
* refused on, because it is the one that hands privileges out.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const read = (file: string) => readFileSync(path.resolve(__dirname, '..', file), 'utf-8')
|
|
14
|
+
|
|
15
|
+
describe('role privileges says what happened', () => {
|
|
16
|
+
const source = read('client/pages/role/role-privilege-page.ts')
|
|
17
|
+
|
|
18
|
+
it('★ draws the shared page state, not a note of its own', () => {
|
|
19
|
+
expect(source).toMatch(/import '@operato\/list-state\/ox-page-state\.js'/)
|
|
20
|
+
expect(source).toMatch(/<ox-page-state/)
|
|
21
|
+
/* The old note element is gone from this screen, import included. */
|
|
22
|
+
expect(source).not.toMatch(/ox-oops-note/)
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('★ keeps what the server said, and offers to read it again', () => {
|
|
26
|
+
expect(source).toMatch(/this\.loadError = response\.errors/)
|
|
27
|
+
expect(source).toMatch(/\.error=\$\{this\.loadError\}/)
|
|
28
|
+
expect(source).toMatch(/@retry=\$\{\(\) => this\.fetch\(\)\}/)
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it('★ a role that is gone is said, not drawn as a role with nothing granted', () => {
|
|
32
|
+
expect(source).toMatch(/if \(!role\?\.id\)/)
|
|
33
|
+
expect(source).toMatch(/i18next\.t\('text\.this role no longer exists'\)/)
|
|
34
|
+
|
|
35
|
+
for (const locale of ['en', 'ko', 'ja', 'zh', 'ms']) {
|
|
36
|
+
const sentences = JSON.parse(read(`translations/${locale}.json`))
|
|
37
|
+
expect([locale, typeof sentences['text.this role no longer exists']]).toEqual([locale, 'string'])
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
it('a screen opened without a role says that, in the reader’s language', () => {
|
|
42
|
+
expect(source).toMatch(/i18next\.t\('text\.no role to show'\)/)
|
|
43
|
+
|
|
44
|
+
for (const locale of ['en', 'ko', 'ja', 'zh', 'ms']) {
|
|
45
|
+
const sentences = JSON.parse(read(`translations/${locale}.json`))
|
|
46
|
+
expect([locale, typeof sentences['text.no role to show']]).toEqual([locale, 'string'])
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
})
|
package/translations/en.json
CHANGED
|
@@ -236,6 +236,7 @@
|
|
|
236
236
|
"text.no privilege granted": "grants nothing",
|
|
237
237
|
"text.no role assigned": "no role assigned",
|
|
238
238
|
"text.no role defined in this domain": "No role is defined in this domain yet. Create one before assigning.",
|
|
239
|
+
"text.no role to show": "this screen was opened without a role",
|
|
239
240
|
"text.no role yet": "No role defined yet",
|
|
240
241
|
"text.none on": "none",
|
|
241
242
|
"text.not declared for this module": "This module does not declare this privilege.",
|
|
@@ -282,6 +283,7 @@
|
|
|
282
283
|
"text.this domain is top level and inherits from nowhere": "top level — nothing is inherited here",
|
|
283
284
|
"text.this field is required": "this field is required",
|
|
284
285
|
"text.this plant may call the seat what it likes": "Call the seat whatever this plant calls it.",
|
|
286
|
+
"text.this role no longer exists": "this role no longer exists",
|
|
285
287
|
"text.token expiry time": "token expiry time",
|
|
286
288
|
"text.unlocks in x minutes": "unlocks in {x} minutes",
|
|
287
289
|
"text.updated_successfully": "updated successfully",
|
package/translations/ja.json
CHANGED
|
@@ -187,6 +187,7 @@
|
|
|
187
187
|
"text.inherited from x": "{x} から継承しています",
|
|
188
188
|
"text.new password": "新しいパスワード",
|
|
189
189
|
"text.no domain available": "使用できるドメインがありません.",
|
|
190
|
+
"text.no role to show": "ロールが指定されずに開かれた画面です",
|
|
190
191
|
"text.not issued": "未発行",
|
|
191
192
|
"text.opens nothing, receives approvals": "opens nothing — this seat receives approvals",
|
|
192
193
|
"text.owner_transfer_completed": "owner変更を完了しました.",
|
|
@@ -219,6 +220,7 @@
|
|
|
219
220
|
"text.this domain is top level and inherits from nowhere": "最上位ドメイン — 継承元がありません",
|
|
220
221
|
"text.this field is required": "必須項目です",
|
|
221
222
|
"text.this plant may call the seat what it likes": "Call the seat whatever this plant calls it.",
|
|
223
|
+
"text.this role no longer exists": "このロールは存在しません",
|
|
222
224
|
"text.token expiry time": "トークン有効期限",
|
|
223
225
|
"text.updated_successfully": "正常にアップデートしました.",
|
|
224
226
|
"text.user invitation prompt": "招待したいユーザーのユーザー名またはメールアドレスを入力してください。",
|
package/translations/ko.json
CHANGED
|
@@ -235,6 +235,7 @@
|
|
|
235
235
|
"text.no privilege granted": "여는 것이 없음",
|
|
236
236
|
"text.no role assigned": "역할 없음",
|
|
237
237
|
"text.no role defined in this domain": "이 도메인에 역할이 없습니다. 역할을 먼저 만들어야 부여할 수 있습니다.",
|
|
238
|
+
"text.no role to show": "역할 없이 열린 화면입니다",
|
|
238
239
|
"text.no role yet": "아직 정의된 역할이 없습니다",
|
|
239
240
|
"text.none on": "없음",
|
|
240
241
|
"text.not declared for this module": "이 모듈에는 그 권한이 선언되어 있지 않습니다.",
|
|
@@ -281,6 +282,7 @@
|
|
|
281
282
|
"text.this domain is top level and inherits from nowhere": "최상위 도메인 — 물려받는 곳이 없습니다",
|
|
282
283
|
"text.this field is required": "필수 항목입니다",
|
|
283
284
|
"text.this plant may call the seat what it likes": "이 공장에서 부르는 이름으로 바꿔도 됩니다.",
|
|
285
|
+
"text.this role no longer exists": "이 역할은 더 이상 없습니다",
|
|
284
286
|
"text.token expiry time": "토큰 만료 시점",
|
|
285
287
|
"text.unlocks in x minutes": "{x}분 뒤 잠금 해제",
|
|
286
288
|
"text.updated_successfully": "성공적으로 업데이트 되었습니다.",
|
package/translations/ms.json
CHANGED
|
@@ -189,6 +189,7 @@
|
|
|
189
189
|
"text.inherited from x": "diwarisi daripada {x}",
|
|
190
190
|
"text.new password": "kata laluan baru",
|
|
191
191
|
"text.no domain available": "maaf, tiada domain untuk dipilih",
|
|
192
|
+
"text.no role to show": "skrin ini dibuka tanpa peranan",
|
|
192
193
|
"text.not issued": "belum dikeluarkan",
|
|
193
194
|
"text.opens nothing, receives approvals": "opens nothing — this seat receives approvals",
|
|
194
195
|
"text.owner_transfer_completed": "pindah pemilik selesai",
|
|
@@ -220,6 +221,7 @@
|
|
|
220
221
|
"text.this domain is top level and inherits from nowhere": "domain teratas — tiada yang diwarisi",
|
|
221
222
|
"text.this field is required": "medan ini diperlukan",
|
|
222
223
|
"text.this plant may call the seat what it likes": "Call the seat whatever this plant calls it.",
|
|
224
|
+
"text.this role no longer exists": "peranan ini tidak wujud lagi",
|
|
223
225
|
"text.token expiry time": "masa tamat token",
|
|
224
226
|
"text.updated_successfully": "berjaya dikemaskini",
|
|
225
227
|
"text.user invitation prompt": "sila masukkan nama pengguna atau alamat e-mel pengguna yang ingin anda jemput.",
|
package/translations/zh.json
CHANGED
|
@@ -188,6 +188,7 @@
|
|
|
188
188
|
"text.inherited from x": "继承自 {x}",
|
|
189
189
|
"text.new password": "新密码",
|
|
190
190
|
"text.no domain available": "抱歉,没有域名",
|
|
191
|
+
"text.no role to show": "打开此页面时未指定角色",
|
|
191
192
|
"text.not issued": "未签发",
|
|
192
193
|
"text.opens nothing, receives approvals": "opens nothing — this seat receives approvals",
|
|
193
194
|
"text.owner_transfer_completed": "所有权转让成功。",
|
|
@@ -220,6 +221,7 @@
|
|
|
220
221
|
"text.this domain is top level and inherits from nowhere": "顶级域 — 没有可继承的来源",
|
|
221
222
|
"text.this field is required": "此项为必填",
|
|
222
223
|
"text.this plant may call the seat what it likes": "Call the seat whatever this plant calls it.",
|
|
224
|
+
"text.this role no longer exists": "此角色已不存在",
|
|
223
225
|
"text.token expiry time": "令牌过期时间",
|
|
224
226
|
"text.updated_successfully": "更新成功",
|
|
225
227
|
"text.user invitation prompt": "请输入您希望邀请的用户的用户名或电子邮件地址。",
|