@xxmachina/common 19.51.0 → 19.80.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 (61) hide show
  1. package/fesm2022/xxmachina-common-_shared-ansi.mjs +0 -16
  2. package/fesm2022/xxmachina-common-_shared-ansi.mjs.map +1 -1
  3. package/fesm2022/xxmachina-common-_shared-meta-redis.mjs +0 -5
  4. package/fesm2022/xxmachina-common-_shared-meta-redis.mjs.map +1 -1
  5. package/fesm2022/xxmachina-common-_shared-meta.mjs +2 -3
  6. package/fesm2022/xxmachina-common-_shared-meta.mjs.map +1 -1
  7. package/fesm2022/xxmachina-common-auth-firebase.mjs +0 -4
  8. package/fesm2022/xxmachina-common-auth-firebase.mjs.map +1 -1
  9. package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs +0 -15
  10. package/fesm2022/xxmachina-common-domain-builder-screen-item.mjs.map +1 -1
  11. package/fesm2022/xxmachina-common-domain-builder.mjs +1 -25
  12. package/fesm2022/xxmachina-common-domain-builder.mjs.map +1 -1
  13. package/fesm2022/xxmachina-common-domain-models.mjs +1 -19
  14. package/fesm2022/xxmachina-common-domain-models.mjs.map +1 -1
  15. package/fesm2022/xxmachina-common-infra-external-quick-js.mjs +0 -3
  16. package/fesm2022/xxmachina-common-infra-external-quick-js.mjs.map +1 -1
  17. package/fesm2022/xxmachina-common-infra-query-hasura.mjs +1 -0
  18. package/fesm2022/xxmachina-common-infra-query-hasura.mjs.map +1 -1
  19. package/fesm2022/xxmachina-common-infra.mjs +0 -19
  20. package/fesm2022/xxmachina-common-infra.mjs.map +1 -1
  21. package/fesm2022/xxmachina-common-invoice-domain-models.mjs +10 -1
  22. package/fesm2022/xxmachina-common-invoice-domain-models.mjs.map +1 -1
  23. package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs +0 -12
  24. package/fesm2022/xxmachina-common-invoice-usecase-invoice.mjs.map +1 -1
  25. package/fesm2022/xxmachina-common-invoice-usecase-order.mjs +0 -2
  26. package/fesm2022/xxmachina-common-invoice-usecase-order.mjs.map +1 -1
  27. package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs +0 -2
  28. package/fesm2022/xxmachina-common-invoice-usecase-partner.mjs.map +1 -1
  29. package/fesm2022/xxmachina-common-services-device-profile.mjs +26 -0
  30. package/fesm2022/xxmachina-common-services-device-profile.mjs.map +1 -0
  31. package/fesm2022/xxmachina-common-services-graphql.mjs +1 -70
  32. package/fesm2022/xxmachina-common-services-graphql.mjs.map +1 -1
  33. package/fesm2022/xxmachina-common-services-speech.mjs +0 -17
  34. package/fesm2022/xxmachina-common-services-speech.mjs.map +1 -1
  35. package/fesm2022/xxmachina-common-usecase-database.mjs +0 -3
  36. package/fesm2022/xxmachina-common-usecase-database.mjs.map +1 -1
  37. package/fesm2022/xxmachina-common-usecase-graphql.mjs +0 -1
  38. package/fesm2022/xxmachina-common-usecase-graphql.mjs.map +1 -1
  39. package/fesm2022/xxmachina-common-usecase.mjs +0 -1
  40. package/fesm2022/xxmachina-common-usecase.mjs.map +1 -1
  41. package/fesm2022/xxmachina-common-utils.mjs +0 -8
  42. package/fesm2022/xxmachina-common-utils.mjs.map +1 -1
  43. package/package.json +15 -11
  44. package/types/xxmachina-common-_shared-ansi.d.ts +0 -15
  45. package/types/xxmachina-common-_shared-ansi.d.ts.map +1 -1
  46. package/types/xxmachina-common-auth-firebase.d.ts +0 -4
  47. package/types/xxmachina-common-auth-firebase.d.ts.map +1 -1
  48. package/types/xxmachina-common-domain-builder-screen-item.d.ts +0 -15
  49. package/types/xxmachina-common-domain-builder-screen-item.d.ts.map +1 -1
  50. package/types/xxmachina-common-domain-builder.d.ts +0 -21
  51. package/types/xxmachina-common-domain-builder.d.ts.map +1 -1
  52. package/types/xxmachina-common-domain-models-presenter.d.ts +0 -46
  53. package/types/xxmachina-common-domain-models-presenter.d.ts.map +1 -1
  54. package/types/xxmachina-common-domain-models.d.ts +0 -59
  55. package/types/xxmachina-common-domain-models.d.ts.map +1 -1
  56. package/types/xxmachina-common-invoice-domain-models.d.ts +6 -1
  57. package/types/xxmachina-common-invoice-domain-models.d.ts.map +1 -1
  58. package/types/xxmachina-common-services-device-profile.d.ts +13 -0
  59. package/types/xxmachina-common-services-device-profile.d.ts.map +1 -0
  60. package/types/xxmachina-common-services-graphql.d.ts +0 -40
  61. package/types/xxmachina-common-services-graphql.d.ts.map +1 -1
@@ -1,23 +1,7 @@
1
- /**
2
- * 「画面全体クリア相当」の ANSI エスケープシーケンス一覧。
3
- *
4
- * accumulator / outputBuffer を truncate する判定に使う。
5
- * client 側 `session-qtp.feature.ts` と server 側 `pty-data-handler.ts` が
6
- * 同じ semantics を持つため、ここで単一 source of truth として定義する。
7
- *
8
- * 除外されるもの(履歴欠落防止のため):
9
- * - `\x1b[?1049h` / `\x1b[?1049l`: alt screen 切替。xterm では main/alt を両方保持。
10
- * truncate すると main/alt の履歴が欠落し xterm が正しく切替復元できない。
11
- * - `\x1b[H\x1b[J` / `\x1b[H\x1b[0J`: cursor home + eraseDown。Ink / log-update 系の
12
- * 差分 rendering でも使われ、全画面クリアとは限らない。過剰検出で会話履歴が消える。
13
- *
14
- * 関連設計: `projects/@machina.at/components/docs/design/fix/20260425_qtp-clear-sequences-sync.md`
15
- */
16
1
  const CLEAR_SEQUENCES = [
17
2
  '\x1b[2J',
18
3
  '\x1b[H\x1b[2J',
19
4
  '\x1bc',
20
- '\x1b[3J',
21
5
  ];
22
6
 
23
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"xxmachina-common-_shared-ansi.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/ansi/clear-sequences.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/ansi/xxmachina-common-_shared-ansi.ts"],"sourcesContent":["/**\n * 「画面全体クリア相当」の ANSI エスケープシーケンス一覧。\n *\n * accumulator / outputBuffer を truncate する判定に使う。\n * client 側 `session-qtp.feature.ts` と server 側 `pty-data-handler.ts` が\n * 同じ semantics を持つため、ここで単一 source of truth として定義する。\n *\n * 除外されるもの(履歴欠落防止のため):\n * - `\\x1b[?1049h` / `\\x1b[?1049l`: alt screen 切替。xterm では main/alt を両方保持。\n * truncate すると main/alt の履歴が欠落し xterm が正しく切替復元できない。\n * - `\\x1b[H\\x1b[J` / `\\x1b[H\\x1b[0J`: cursor home + eraseDown。Ink / log-update 系の\n * 差分 rendering でも使われ、全画面クリアとは限らない。過剰検出で会話履歴が消える。\n *\n * 関連設計: `projects/@machina.at/components/docs/design/fix/20260425_qtp-clear-sequences-sync.md`\n */\nexport const CLEAR_SEQUENCES: readonly string[] = [\n '\\x1b[2J',\n '\\x1b[H\\x1b[2J',\n '\\x1bc',\n '\\x1b[3J',\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;AAcG;AACI,MAAM,eAAe,GAAsB;IAChD,SAAS;IACT,eAAe;IACf,OAAO;IACP,SAAS;;;ACnBX;;AAEG;;;;"}
1
+ {"version":3,"file":"xxmachina-common-_shared-ansi.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/ansi/clear-sequences.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/ansi/xxmachina-common-_shared-ansi.ts"],"sourcesContent":["\nexport const CLEAR_SEQUENCES: readonly string[] = [\n '\\x1b[2J',\n '\\x1b[H\\x1b[2J',\n '\\x1bc',\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AACO,MAAM,eAAe,GAAsB;IAChD,SAAS;IACT,eAAe;IACf,OAAO;;;ACJT;;AAEG;;;;"}
@@ -16,11 +16,6 @@ class Converter {
16
16
  }
17
17
  }
18
18
  function safeCreateClient(params) {
19
- // try {
20
- // return createClient(params);
21
- // } catch (error) {
22
- // console.error(error);
23
- // }
24
19
  }
25
20
  class RedisRepository {
26
21
  converter = new Converter();
@@ -1 +1 @@
1
- {"version":3,"file":"xxmachina-common-_shared-meta-redis.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.config.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.repository.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/xxmachina-common-_shared-meta-redis.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport interface RedisConfig {\n url: string;\n}\n\nexport const REDIS_CONFIG = new InjectionToken<RedisConfig>('[@nx-ddd/redis] Redis Config');\n\nexport function provideRedisConfig(config: RedisConfig) {\n return { provide: REDIS_CONFIG, useValue: config };\n}\n","import { inject, Inject, Injectable } from \"@angular/core\";\nimport { RedisClientType, createClient } from 'redis';\nimport { REDIS_CONFIG, RedisConfig } from './redis.config';\nimport { omit } from 'lodash-es';\n\nexport class Converter<E, R> {\n fromRedis(record: R): E {\n return {...record} as never as E; \n }\n\n toRedis(entity: E): R {\n return {...entity} as never as R;\n }\n}\n\nfunction safeCreateClient(params: {url : string}) {\n // try {\n // return createClient(params);\n // } catch (error) {\n // console.error(error);\n // }\n}\n\n@Injectable({ providedIn: 'root' })\nexport abstract class RedisRepository<E extends {id: string} = any, R extends object = object> {\n protected abstract entityName: string;\n protected converter: Converter<E, R> = new Converter();\n protected config: RedisConfig = inject(REDIS_CONFIG);\n protected client: RedisClientType = safeCreateClient({\n url: this.config.url,\n }) as any;\n\n constructor(\n ) { }\n\n async init() {\n try {\n if (!this.client?.isOpen) await this.client.connect();\n } catch (error) {\n console.error(error);\n }\n }\n\n async list() {\n await this.init();\n const keys = await this.client.keys(`${this.entityName}:*`)\n .then((keys) => keys.map(key => key.slice(this.entityName.length + 1)));\n const entities = await Promise.all(keys.map(key => this.get(key)));\n return entities;\n }\n\n async get(id: string): Promise<E> {\n await this.init();\n const key = this.getKey(id);\n const entity = await this.client.hGetAll(key);\n return this.converter.fromRedis({...entity, id} as any);\n }\n\n async create(entity: E): Promise<E> {\n await this.init();\n const key = this.getKey(entity.id);\n if (await this.client.exists(key)) throw new Error(`Entity ${key} already exists`);\n const record = omit(this.converter.toRedis(entity), 'id') as {};\n console.debug('create', key, record);\n await this.client.hSet(key, record);\n return entity;\n }\n\n async update(entity: any): Promise<void> {\n await this.init();\n const key = this.getKey(entity.id);\n if (!await this.client.exists(key)) throw new Error(`Entity ${key} does not exist`);\n await this.client.hSet(key, omit(this.converter.toRedis(entity), 'id') as {});\n }\n\n async delete(id: string): Promise<void> {\n await this.init();\n const key = this.getKey(id);\n if (!await this.client.exists(key)) throw new Error(`Entity ${id} does not exist`);\n await this.client.del(key);\n }\n\n async deleteAll(): Promise<void> {\n await this.init();\n const keys = await this.client.keys(`${this.entityName}:*`);\n await Promise.all(keys.map(key => this.client.del(key)));\n }\n\n getKey(id: string): string {\n return `${this.entityName}:${id}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,YAAY,GAAG,IAAI,cAAc,CAAc,8BAA8B;AAEpF,SAAU,kBAAkB,CAAC,MAAmB,EAAA;IACpD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;AACpD;;MCLa,SAAS,CAAA;AACpB,IAAA,SAAS,CAAC,MAAS,EAAA;AACjB,QAAA,OAAO,EAAC,GAAG,MAAM,EAAe;IAClC;AAEA,IAAA,OAAO,CAAC,MAAS,EAAA;AACf,QAAA,OAAO,EAAC,GAAG,MAAM,EAAe;IAClC;AACD;AAED,SAAS,gBAAgB,CAAC,MAAsB,EAAA;;;;;;AAMhD;MAGsB,eAAe,CAAA;AAEzB,IAAA,SAAS,GAAoB,IAAI,SAAS,EAAE;AAC5C,IAAA,MAAM,GAAgB,MAAM,CAAC,YAAY,CAAC;IAC1C,MAAM,GAAoB,gBAAgB,CAAC;AACnD,QAAA,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG;AACrB,KAAA,CAAQ;AAET,IAAA,WAAA,GAAA,EACI;AAEJ,IAAA,MAAM,IAAI,GAAA;A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AI,CAAC,IAAI,EAAE;AACjB,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,CAAA,EAAA,CAAI,CAAC;QAC3D,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1D;AAEA,IAAA,MAAM,CAAC,EAAU,EAAA;AACf,QAAA,OAAO,GAAG,IAAI,CAAC,UAAU,CAAA,CAAA,EAAI,EAAE,EAAE;IACnC;uGAlEoB,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADX,MAAM,EAAA,CAAA;;2FACV,eAAe,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACvBlC;;AAEG;;;;"}
1
+ {"version":3,"file":"xxmachina-common-_shared-meta-redis.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.config.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/redis.repository.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/meta/redis/xxmachina-common-_shared-meta-redis.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nexport interface RedisConfig {\n url: string;\n}\n\nexport const REDIS_CONFIG = new InjectionToken<RedisConfig>('[@nx-ddd/redis] Redis Config');\n\nexport function provideRedisConfig(config: RedisConfig) {\n return { provide: REDIS_CONFIG, useValue: config };\n}\n","import { inject, Inject, Injectable } from \"@angular/core\";\nimport { RedisClientType, createClient } from 'redis';\nimport { REDIS_CONFIG, RedisConfig } from './redis.config';\nimport { omit } from 'lodash-es';\n\nexport class Converter<E, R> {\n fromRedis(record: R): E {\n return {...record} as never as E; \n }\n\n toRedis(entity: E): R {\n return {...entity} as never as R;\n }\n}\n\nfunction safeCreateClient(params: {url : string}) {\n \n \n \n \n \n}\n\n@Injectable({ providedIn: 'root' })\nexport abstract class RedisRepository<E extends {id: string} = any, R extends object = object> {\n protected abstract entityName: string;\n protected converter: Converter<E, R> = new Converter();\n protected config: RedisConfig = inject(REDIS_CONFIG);\n protected client: RedisClientType = safeCreateClient({\n url: this.config.url,\n }) as any;\n\n constructor(\n ) { }\n\n async init() {\n try {\n if (!this.client?.isOpen) await this.client.connect();\n } catch (error) {\n console.error(error);\n }\n }\n\n async list() {\n await this.init();\n const keys = await this.client.keys(`${this.entityName}:*`)\n .then((keys) => keys.map(key => key.slice(this.entityName.length + 1)));\n const entities = await Promise.all(keys.map(key => this.get(key)));\n return entities;\n }\n\n async get(id: string): Promise<E> {\n await this.init();\n const key = this.getKey(id);\n const entity = await this.client.hGetAll(key);\n return this.converter.fromRedis({...entity, id} as any);\n }\n\n async create(entity: E): Promise<E> {\n await this.init();\n const key = this.getKey(entity.id);\n if (await this.client.exists(key)) throw new Error(`Entity ${key} already exists`);\n const record = omit(this.converter.toRedis(entity), 'id') as {};\n console.debug('create', key, record);\n await this.client.hSet(key, record);\n return entity;\n }\n\n async update(entity: any): Promise<void> {\n await this.init();\n const key = this.getKey(entity.id);\n if (!await this.client.exists(key)) throw new Error(`Entity ${key} does not exist`);\n await this.client.hSet(key, omit(this.converter.toRedis(entity), 'id') as {});\n }\n\n async delete(id: string): Promise<void> {\n await this.init();\n const key = this.getKey(id);\n if (!await this.client.exists(key)) throw new Error(`Entity ${id} does not exist`);\n await this.client.del(key);\n }\n\n async deleteAll(): Promise<void> {\n await this.init();\n const keys = await this.client.keys(`${this.entityName}:*`);\n await Promise.all(keys.map(key => this.client.del(key)));\n }\n\n getKey(id: string): string {\n return `${this.entityName}:${id}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAMa,YAAY,GAAG,IAAI,cAAc,CAAc,8BAA8B;AAEpF,SAAU,kBAAkB,CAAC,MAAmB,EAAA;IACpD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE;AACpD;;MCLa,SAAS,CAAA;AACpB,IAAA,SAAS,CAAC,MAAS,EAAA;AACjB,QAAA,OAAO,EAAC,GAAG,MAAM,EAAe;IAClC;AAEA,IAAA,OAAO,CAAC,MAAS,EAAA;AACf,QAAA,OAAO,EAAC,GAAG,MAAM,EAAe;IAClC;AACD;AAED,SAAS,gBAAgB,CAAC,MAAsB,EAAA;AAMhD;MAGsB,eAAe,CAAA;AAEzB,IAAA,SAAS,GAAoB,IAAI,SAAS,EAAE;AAC5C,IAAA,MAAM,GAAgB,MAAM,CAAC,YAAY,CAAC;IAC1C,MAAM,GAAoB,gBAAgB,CAAC;AACnD,QAAA,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG;AACrB,KAAA,CAAQ;AAET,IAAA,WAAA,GAAA,EACI;AAEJ,IAAA,MAAM,IAAI,GAAA;AACR,QAAA,IAAI;AACF,YAAA,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM;AAAE,gBAAA,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;QACvD;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;QACtB;IACF;AAEA,IAAA,MAAM,IAAI,GAAA;AACR,QAAA,MAAM,IAAI,CAAC,IAAI,EAAE;AACjB,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA,EAAG,IAAI,CAAC,UAAU,IAAI;AACvD,aAAA,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,GAAG,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A,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADX,MAAM,EAAA,CAAA;;2FACV,eAAe,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACvBlC;;AAEG;;;;"}
@@ -2,18 +2,17 @@ let ObjectType, Field, ID;
2
2
  const _decorators = {
3
3
  ObjectType: function () {
4
4
  return function (target) {
5
- // return target;
5
+ void 0;
6
6
  };
7
7
  },
8
8
  Field: function () {
9
9
  return function (target, propertyKey) {
10
- // return target;
10
+ void 0;
11
11
  };
12
12
  },
13
13
  ID: null,
14
14
  };
15
15
  ({ ObjectType, Field, ID } = _decorators);
16
- // GraphQLのデコレーターをファクトリーメソッドで提供
17
16
  function provideNestjsGraphql(_decorators) {
18
17
  ({ ObjectType, Field, ID } = _decorators);
19
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"xxmachina-common-_shared-meta.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/meta/decorators.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/meta/xxmachina-common-_shared-meta.ts"],"sourcesContent":["import type decorators from '@nestjs/graphql';\n\nlet ObjectType, Field, ID;\n\nconst _decorators: Partial<typeof decorators> = {\n ObjectType: function(): ClassDecorator {\n return function (target: any) {\n // return target;\n }\n },\n Field: function(): PropertyDecorator {\n return function (target: any, propertyKey: string | symbol) {\n // return target;\n }\n },\n ID: null as any,\n};\n({ ObjectType, Field, ID } = _decorators as any);\n\n// GraphQLのデコレーターをファクトリーメソッドで提供\nexport function provideNestjsGraphql(_decorators: typeof decorators) {\n ({ ObjectType, Field, ID } = _decorators);\n}\n\nexport { ObjectType, Field, ID };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAEA,IAAI,UAAU,CAAA,CAAE,KAAK,CAAA,CAAE;AAEvB,MAAM,WAAW,GAA+B;AAC9C,IAAA,UAAU,EAAE,YAAA;AACV,QAAA,OAAO,UAAU,MAAW,EAAA;;AAE5B,QAAA,CAAC;IACH,CAAC;AACD,IAAA,KAAK,EAAE,YAAA;QACL,OAAO,UAAU,MAAW,EAAE,WAA4B,EAAA;;AAE1D,QAAA,CAAC;IACH,CAAC;AACD,IAAA,EAAE,EAAE,IAAW;CAChB;AACD,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,WAAkB;AAE/C;AACM,SAAU,oBAAoB,CAAC,WAA8B,EAAA;IACjE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,WAAW;AAC1C;;ACtBA;;AAEG;;;;"}
1
+ {"version":3,"file":"xxmachina-common-_shared-meta.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/_shared/meta/decorators.ts","../../../../../packages/@xxmachina/common/src/lib/_shared/meta/xxmachina-common-_shared-meta.ts"],"sourcesContent":["import type decorators from '@nestjs/graphql';\n\nlet ObjectType, Field, ID;\n\nconst _decorators: Partial<typeof decorators> = {\n ObjectType: function(): ClassDecorator {\n return function (target: any) {\n void 0;\n }\n },\n Field: function(): PropertyDecorator {\n return function (target: any, propertyKey: string | symbol) {\n void 0;\n }\n },\n ID: null as any,\n};\n({ ObjectType, Field, ID } = _decorators as any);\n\n\nexport function provideNestjsGraphql(_decorators: typeof decorators) {\n ({ ObjectType, Field, ID } = _decorators);\n}\n\nexport { ObjectType, Field, ID };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAEA,IAAI,UAAU,CAAA,CAAE,KAAK,CAAA,CAAE;AAEvB,MAAM,WAAW,GAA+B;AAC9C,IAAA,UAAU,EAAE,YAAA;AACV,QAAA,OAAO,UAAU,MAAW,EAAA;AAC1B,YAAA,KAAK,CAAC;AACR,QAAA,CAAC;IACH,CAAC;AACD,IAAA,KAAK,EAAE,YAAA;QACL,OAAO,UAAU,MAAW,EAAE,WAA4B,EAAA;AACxD,YAAA,KAAK,CAAC;AACR,QAAA,CAAC;IACH,CAAC;AACD,IAAA,EAAE,EAAE,IAAW;CAChB;AACD,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,WAAkB;AAGzC,SAAU,oBAAoB,CAAC,WAA8B,EAAA;IACjE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,WAAW;AAC1C;;ACtBA;;AAEG;;;;"}
@@ -6,10 +6,6 @@ import { AuthService as AuthService$1 } from '@ng-atomic/common/services/auth';
6
6
  export { AuthService as FirebaseAuthService } from '@ng-atomic/common/services/auth';
7
7
 
8
8
  const LOGOUT_CONFIRM_MESSAGE = 'ログアウトしますか?';
9
- /**
10
- * SIGN_OUT effect factory。window.confirm で確認ダイアログを表示し、
11
- * OK の時のみ signOut() を実行する。
12
- */
13
9
  function createSignOutEffect() {
14
10
  const auth = inject(AuthService);
15
11
  return () => {
@@ -1 +1 @@
1
- {"version":3,"file":"xxmachina-common-auth-firebase.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/auth/firebase/firebase-auth.di.ts","../../../../../packages/@xxmachina/common/src/lib/auth/firebase/xxmachina-common-auth-firebase.ts"],"sourcesContent":["import { EnvironmentProviders, inject, makeEnvironmentProviders, provideAppInitializer } from \"@angular/core\";\nimport { provideEffect } from \"@ng-atomic/core\";\nimport { AppFrameStore } from \"@ng-atomic/components/frames/app\";\nimport { AuthService } from \"@xxmachina/common/auth\";\nimport { FirebaseAuthService } from \"./firebase-auth.service\";\n\nexport const LOGOUT_CONFIRM_MESSAGE = 'ログアウトしますか?';\n\n/**\n * SIGN_OUT effect factory。window.confirm で確認ダイアログを表示し、\n * OK の時のみ signOut() を実行する。\n */\nexport function createSignOutEffect() {\n const auth = inject(AuthService);\n return () => {\n if (!window.confirm(LOGOUT_CONFIRM_MESSAGE)) {\n return;\n }\n return auth.signOut();\n };\n}\n\nexport function provideAuthService(config: {} = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: AuthService, useClass: FirebaseAuthService },\n provideAppInitializer(() => { inject(AuthService) }),\n provideEffect(AppFrameStore.ActionId.SIGN_IN_WITH_MICROSOFT, () => {\n const auth = inject(AuthService);\n return () => {\n console.debug('auth:', auth);\n if (!auth.auth()) {\n auth.signIn();\n } else {\n console.log('既にログイン済みです。');\n }\n }\n }),\n provideEffect(AppFrameStore.ActionId.SIGN_OUT, createSignOutEffect),\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["FirebaseAuthService"],"mappings":";;;;;;;AAMO,MAAM,sBAAsB,GAAG;AAEtC;;;AAGG;SACa,mBAAmB,GAAA;AACjC,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,IAAA,OAAO,MAAK;QACV,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE;YAC3C;QACF;AACA,QAAA,OAAO,IAAI,CAAC,OAAO,EAAE;AACvB,IAAA,CAAC;AACH;AAEM,SAAU,kBAAkB,CAAC,MAAA,GAAa,EAAE,EAAA;AAChD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAEA,aAAmB,EAAE;QACvD,qBAAqB,CAAC,MAAK,EAAG,MAAM,CAAC,WAAW,CAAC,CAAA,CAAC,CAAC,CAAC;QACpD,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,sBAAsB,EAAE,MAAK;AAChE,YAAA,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,YAAA,OAAO,MAAK;AACV,gBAAA,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;AAC5B,gBAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;oBAChB,IAAI,CAAC,MAAM,EAAE;gBACf;qBAAO;AACL,oBAAA,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;gBAC5B;AACF,YAAA,CAAC;AACH,QAAA,CAAC,CAAC;QACF,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;AACpE,KAAA,CAAC;AACJ;;ACvCA;;AAEG;;;;"}
1
+ {"version":3,"file":"xxmachina-common-auth-firebase.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/auth/firebase/firebase-auth.di.ts","../../../../../packages/@xxmachina/common/src/lib/auth/firebase/xxmachina-common-auth-firebase.ts"],"sourcesContent":["import { EnvironmentProviders, inject, makeEnvironmentProviders, provideAppInitializer } from \"@angular/core\";\nimport { provideEffect } from \"@ng-atomic/core\";\nimport { AppFrameStore } from \"@ng-atomic/components/frames/app\";\nimport { AuthService } from \"@xxmachina/common/auth\";\nimport { FirebaseAuthService } from \"./firebase-auth.service\";\n\nexport const LOGOUT_CONFIRM_MESSAGE = 'ログアウトしますか?';\n\n\nexport function createSignOutEffect() {\n const auth = inject(AuthService);\n return () => {\n if (!window.confirm(LOGOUT_CONFIRM_MESSAGE)) {\n return;\n }\n return auth.signOut();\n };\n}\n\nexport function provideAuthService(config: {} = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: AuthService, useClass: FirebaseAuthService },\n provideAppInitializer(() => { inject(AuthService) }),\n provideEffect(AppFrameStore.ActionId.SIGN_IN_WITH_MICROSOFT, () => {\n const auth = inject(AuthService);\n return () => {\n console.debug('auth:', auth);\n if (!auth.auth()) {\n auth.signIn();\n } else {\n console.log('既にログイン済みです。');\n }\n }\n }),\n provideEffect(AppFrameStore.ActionId.SIGN_OUT, createSignOutEffect),\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["FirebaseAuthService"],"mappings":";;;;;;;AAMO,MAAM,sBAAsB,GAAG;SAGtB,mBAAmB,GAAA;AACjC,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,IAAA,OAAO,MAAK;QACV,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE;YAC3C;QACF;AACA,QAAA,OAAO,IAAI,CAAC,OAAO,EAAE;AACvB,IAAA,CAAC;AACH;AAEM,SAAU,kBAAkB,CAAC,MAAA,GAAa,EAAE,EAAA;AAChD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAEA,aAAmB,EAAE;QACvD,qBAAqB,CAAC,MAAK,EAAG,MAAM,CAAC,WAAW,CAAC,CAAA,CAAC,CAAC,CAAC;QACpD,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,sBAAsB,EAAE,MAAK;AAChE,YAAA,MAAM,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,YAAA,OAAO,MAAK;AACV,gBAAA,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;AAC5B,gBAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE;oBAChB,IAAI,CAAC,MAAM,EAAE;gBACf;qBAAO;AACL,oBAAA,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;gBAC5B;AACF,YAAA,CAAC;AACH,QAAA,CAAC,CAAC;QACF,aAAa,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;AACpE,KAAA,CAAC;AACJ;;ACpCA;;AAEG;;;;"}
@@ -1,6 +1,3 @@
1
- /**
2
- * Notionプロパティタイプから画面項目設定へのマッピング
3
- */
4
1
  const NOTION_PROPERTY_CONFIG_MAP = {
5
2
  select: { type: '入力(単一選択)', notionPropType: 'セレクト', valueType: 'string' },
6
3
  multi_select: { type: '入力(複数選択)', notionPropType: 'マルチセレクト', valueType: 'string' },
@@ -21,17 +18,11 @@ const NOTION_PROPERTY_CONFIG_MAP = {
21
18
  formula: { type: '表示', notionPropType: '数式', valueType: 'any' },
22
19
  button: { type: 'ボタン', notionPropType: 'ボタン', valueType: 'string' },
23
20
  };
24
- /**
25
- * デフォルト設定(未知のプロパティタイプ用)
26
- */
27
21
  const DEFAULT_PROPERTY_CONFIG = {
28
22
  type: '不明',
29
23
  notionPropType: '',
30
24
  valueType: 'string',
31
25
  };
32
- /**
33
- * プロパティタイプから設定を取得
34
- */
35
26
  function getPropertyConfig(propertyType) {
36
27
  return NOTION_PROPERTY_CONFIG_MAP[propertyType] ?? {
37
28
  ...DEFAULT_PROPERTY_CONFIG,
@@ -39,9 +30,6 @@ function getPropertyConfig(propertyType) {
39
30
  };
40
31
  }
41
32
 
42
- /**
43
- * Notionプロパティから画面項目を構築
44
- */
45
33
  function buildPageItem(property, propName, dbName) {
46
34
  const config = getPropertyConfig(property.type);
47
35
  return {
@@ -54,9 +42,6 @@ function buildPageItem(property, propName, dbName) {
54
42
  dbName,
55
43
  };
56
44
  }
57
- /**
58
- * データベースから画面項目リストを構築するビルダー
59
- */
60
45
  class ScreenItemBuilder {
61
46
  build(database) {
62
47
  const items = [];
@@ -1 +1 @@
1
- {"version":3,"file":"xxmachina-common-domain-builder-screen-item.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/notion-property-config.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/screen-item.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/xxmachina-common-domain-builder-screen-item.ts"],"sourcesContent":["import { ScreenItem } from '@xxmachina/common/domain/models';\n\n/**\n * Notionプロパティタイプ別の設定マッピング\n */\nexport interface NotionPropertyConfig {\n type: ScreenItem['type'];\n notionPropType: string;\n valueType: ScreenItem['valueType'];\n}\n\n/**\n * Notionプロパティタイプから画面項目設定へのマッピング\n */\nexport const NOTION_PROPERTY_CONFIG_MAP: Record<string, NotionPropertyConfig> = {\n select: { type: '入力(単一選択)', notionPropType: 'セレクト', valueType: 'string' },\n multi_select: { type: '入力(複数選択)', notionPropType: 'マルチセレクト', valueType: 'string' },\n relation: { type: '入力(単一選択)', notionPropType: 'リレーション', valueType: 'string' },\n rollup: { type: '表示', notionPropType: 'ロールアップ', valueType: 'string' },\n unique_id: { type: '表示', notionPropType: 'ユニークID', valueType: 'string' },\n created_time: { type: '表示', notionPropType: '作成日時', valueType: 'date' },\n created_by: { type: '表示', notionPropType: '作成者', valueType: 'string' },\n rich_text: { type: '入力(テキスト)', notionPropType: 'テキスト', valueType: 'string' },\n number: { type: '入力(数値)', notionPropType: '数値', valueType: 'number' },\n date: { type: '入力(日時)', notionPropType: '日時', valueType: 'date' },\n checkbox: { type: '入力(複数選択)', notionPropType: 'チェックボックス', valueType: 'boolean' },\n title: { type: '入力(テキスト)', notionPropType: 'タイトル', valueType: 'string' },\n people: { type: '入力(単一選択)', notionPropType: 'ユーザー', valueType: 'string' },\n last_edited_time: { type: '表示', notionPropType: '最終更新日時', valueType: 'date' },\n last_edited_by: { type: '表示', notionPropType: '最終更新者', valueType: 'string' },\n status: { type: '入力(単一選択)', notionPropType: 'ステータス', valueType: 'string' },\n formula: { type: '表示', notionPropType: '数式', valueType: 'any' },\n button: { type: 'ボタン', notionPropType: 'ボタン', valueType: 'string' },\n};\n\n/**\n * デフォルト設定(未知のプロパティタイプ用)\n */\nexport const DEFAULT_PROPERTY_CONFIG: NotionPropertyConfig = {\n type: '不明',\n notionPropType: '',\n valueType: 'string',\n};\n\n/**\n * プロパティタイプから設定を取得\n */\nexport function getPropertyConfig(propertyType: string): NotionPropertyConfig {\n return NOTION_PROPERTY_CONFIG_MAP[propertyType] ?? {\n ...DEFAULT_PROPERTY_CONFIG,\n notionPropType: propertyType,\n };\n}\n","import { ScreenItem } from '@xxmachina/common/domain/models';\nimport type { GetDatabaseResponse } from '@notionhq/client/build/src/api-endpoints';\nimport { Database } from '@xxmachina/common/domain/models';\nimport { getPropertyConfig } from './notion-property-config';\n\n/**\n * Notionプロパティから画面項目を構築\n */\nfunction buildPageItem(\n property: GetDatabaseResponse['properties'][string],\n propName: string,\n dbName: string,\n): ScreenItem {\n const config = getPropertyConfig(property.type);\n\n return {\n id: property?.['id'] ?? '',\n name: propName,\n type: config.type,\n notionPropType: config.notionPropType,\n formula: '',\n valueType: config.valueType,\n dbName,\n };\n}\n\n/**\n * データベースから画面項目リストを構築するビルダー\n */\nexport class ScreenItemBuilder {\n build(database: Database): ScreenItem[] {\n const items: ScreenItem[] = [];\n\n Object.entries(database?.properties ?? {}).sort((a, b) => {\n return a[0].localeCompare(b[0]);\n }).filter(([propName, prop]) => {\n return true;\n }).forEach(([propName, prop]) => {\n const item = buildPageItem(prop, propName, database?.title?.[0]?.plain_text ?? '');\n items.push(item);\n });\n\n return items;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAWA;;AAEG;AACI,MAAM,0BAA0B,GAAyC;AAC9E,IAAA,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE;AACzE,IAAA,YAAY,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE;AAClF,IAAA,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE;AAC7E,IAAA,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE;AACrE,IAAA,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE;AACxE,IAAA,YAAY,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE;AACvE,IAAA,UAAU,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AAG,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,UAAU,IAAI,EAAE,CAAC;AAClF,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAClB,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,KAAK;IACd;AACD;;AC5CD;;AAEG;;;;"}
1
+ {"version":3,"file":"xxmachina-common-domain-builder-screen-item.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/notion-property-config.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/screen-item.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/xxmachina-common-domain-builder-screen-item.ts"],"sourcesContent":["import { ScreenItem } from '@xxmachina/common/domain/models';\n\n\nexport interface NotionPropertyConfig {\n type: ScreenItem['type'];\n notionPropType: string;\n valueType: ScreenItem['valueType'];\n}\n\n\nexport const NOTION_PROPERTY_CONFIG_MAP: Record<string, NotionPropertyConfig> = {\n select: { type: '入力(単一選択)', notionPropType: 'セレクト', valueType: 'string' },\n multi_select: { type: '入力(複数選択)', notionPropType: 'マルチセレクト', valueType: 'string' },\n relation: { type: '入力(単一選択)', notionPropType: 'リレーション', valueType: 'string' },\n rollup: { type: '表示', notionPropType: 'ロールアップ', valueType: 'string' },\n unique_id: { type: '表示', notionPropType: 'ユニークID', valueType: 'string' },\n created_time: { type: '表示', notionPropType: '作成日時', valueType: 'date' },\n created_by: { type: '表示', notionPropType: '作成者', valueType: 'string' },\n rich_text: { type: '入力(テキスト)', notionPropType: 'テキスト', valueType: 'string' },\n number: { type: '入力(数値)', notionPropType: '数値', valueType: 'number' },\n date: { type: '入力(日時)', notionPropType: '日時', valueType: 'date' },\n checkbox: { type: '入力(複数選択)', notionPropType: 'チェックボックス', valueType: 'boolean' },\n title: { type: '入力(テキスト)', notionPropType: 'タイトル', valueType: 'string' },\n people: { type: '入力(単一選択)', notionPropType: 'ユーザー', valueType: 'string' },\n last_edited_time: { type: '表示', notionPropType: '最終更新日時', valueType: 'date' },\n last_edited_by: { type: '表示', notionPropType: '最終更新者', valueType: 'string' },\n status: { type: '入力(単一選択)', notionPropType: 'ステータス', valueType: 'string' },\n formula: { type: '表示', notionPropType: '数式', valueType: 'any' },\n button: { type: 'ボタン', notionPropType: 'ボタン', valueType: 'string' },\n};\n\n\nexport const DEFAULT_PROPERTY_CONFIG: NotionPropertyConfig = {\n type: '不明',\n notionPropType: '',\n valueType: 'string',\n};\n\n\nexport function getPropertyConfig(propertyType: string): NotionPropertyConfig {\n return NOTION_PROPERTY_CONFIG_MAP[propertyType] ?? {\n ...DEFAULT_PROPERTY_CONFIG,\n notionPropType: propertyType,\n };\n}\n","import { ScreenItem } from '@xxmachina/common/domain/models';\nimport type { GetDatabaseResponse } from '@notionhq/client/build/src/api-endpoints';\nimport { Database } from '@xxmachina/common/domain/models';\nimport { getPropertyConfig } from './notion-property-config';\n\n\nfunction buildPageItem(\n property: GetDatabaseResponse['properties'][string],\n propName: string,\n dbName: string,\n): ScreenItem {\n const config = getPropertyConfig(property.type);\n\n return {\n id: property?.['id'] ?? '',\n name: propName,\n type: config.type,\n notionPropType: config.notionPropType,\n formula: '',\n valueType: config.valueType,\n dbName,\n };\n}\n\n\nexport class ScreenItemBuilder {\n build(database: Database): ScreenItem[] {\n const items: ScreenItem[] = [];\n\n Object.entries(database?.properties ?? {}).sort((a, b) => {\n return a[0].localeCompare(b[0]);\n }).filter(([propName, prop]) => {\n return true;\n }).forEach(([propName, prop]) => {\n const item = buildPageItem(prop, propName, database?.title?.[0]?.plain_text ?? '');\n items.push(item);\n });\n\n return items;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAUO,MAAM,0BAA0B,GAAyC;AAC9E,IAAA,MAAM,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE;AACzE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AAC5B,IAAA,KAAK,CAAC,QAAkB,EAAA;QACtB,MAAM,KAAK,GAAiB,EAAE;AAE9B,QAAA,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;AACvD,YAAA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAI;AAC7B,YAAA,OAAO,IAAI;QACb,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAI;YAC9B,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,UAAU,IAAI,EAAE,CAAC;AAClF,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAClB,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,KAAK;IACd;AACD;;ACxCD;;AAEG;;;;"}
@@ -120,9 +120,6 @@ class CommandActionsBuilder {
120
120
  }
121
121
  }
122
122
 
123
- /**
124
- * コマンド用のナビゲーションアクションを作成
125
- */
126
123
  function createCommandNavigateAction(command, navigationExtras = {}, item = {}, options = {}, overwrite = {}) {
127
124
  if (!command)
128
125
  return null;
@@ -133,9 +130,6 @@ function createCommandNavigateAction(command, navigationExtras = {}, item = {},
133
130
  .setFilterIds([command.id])
134
131
  .buildActions(item, navigationExtras, overwrite)[0];
135
132
  }
136
- /**
137
- * コマンド用の実行アクションを作成
138
- */
139
133
  function createCommandExecutionAction(command, item = {}, options = {}, overwrite = {}) {
140
134
  if (!command)
141
135
  return null;
@@ -207,7 +201,6 @@ class ErBuilder {
207
201
  const key = NOTION_KEY_MAP[type] ?? ' ';
208
202
  const field = `${mappedType} ${type} ${key} "${propName}"`;
209
203
  fields.push(field);
210
- // リレーションシップの解析
211
204
  if (type === 'relation') {
212
205
  const relation = prop['relation'];
213
206
  if (relation && relation.database_id) {
@@ -217,7 +210,7 @@ class ErBuilder {
217
210
  source: name,
218
211
  target: targetDbName,
219
212
  label: propName,
220
- type: '||--||', // リレーションのタイプを適宜設定
213
+ type: '||--||',
221
214
  });
222
215
  }
223
216
  else if (relation && Array.isArray(relation)) {
@@ -238,13 +231,11 @@ class ErBuilder {
238
231
  }
239
232
  buildMermaidER(schemas) {
240
233
  let mermaid = 'erDiagram\n';
241
- // エンティティの定義
242
234
  schemas.forEach(schema => {
243
235
  mermaid += ` "${schema.name}" {\n`;
244
236
  mermaid += schema.fields.map(field => ` ${field}`).join('\n');
245
237
  mermaid += '\n }\n';
246
238
  });
247
- // リレーションシップの定義
248
239
  schemas.forEach(schema => {
249
240
  schema.relations.forEach(relation => {
250
241
  mermaid += ` "${relation.source}" ${relation.type} "${relation.target}" : "${relation.label}"\n`;
@@ -276,9 +267,6 @@ class QueryBuilder {
276
267
  }
277
268
  }
278
269
 
279
- /**
280
- * Notionプロパティタイプから画面項目設定へのマッピング
281
- */
282
270
  const NOTION_PROPERTY_CONFIG_MAP = {
283
271
  select: { type: '入力(単一選択)', notionPropType: 'セレクト', valueType: 'string' },
284
272
  multi_select: { type: '入力(複数選択)', notionPropType: 'マルチセレクト', valueType: 'string' },
@@ -299,17 +287,11 @@ const NOTION_PROPERTY_CONFIG_MAP = {
299
287
  formula: { type: '表示', notionPropType: '数式', valueType: 'any' },
300
288
  button: { type: 'ボタン', notionPropType: 'ボタン', valueType: 'string' },
301
289
  };
302
- /**
303
- * デフォルト設定(未知のプロパティタイプ用)
304
- */
305
290
  const DEFAULT_PROPERTY_CONFIG = {
306
291
  type: '不明',
307
292
  notionPropType: '',
308
293
  valueType: 'string',
309
294
  };
310
- /**
311
- * プロパティタイプから設定を取得
312
- */
313
295
  function getPropertyConfig(propertyType) {
314
296
  return NOTION_PROPERTY_CONFIG_MAP[propertyType] ?? {
315
297
  ...DEFAULT_PROPERTY_CONFIG,
@@ -317,9 +299,6 @@ function getPropertyConfig(propertyType) {
317
299
  };
318
300
  }
319
301
 
320
- /**
321
- * Notionプロパティから画面項目を構築
322
- */
323
302
  function buildPageItem(property, propName, dbName) {
324
303
  const config = getPropertyConfig(property.type);
325
304
  return {
@@ -332,9 +311,6 @@ function buildPageItem(property, propName, dbName) {
332
311
  dbName,
333
312
  };
334
313
  }
335
- /**
336
- * データベースから画面項目リストを構築するビルダー
337
- */
338
314
  class ScreenItemBuilder {
339
315
  build(database) {
340
316
  const items = [];
@@ -1 +1 @@
1
- {"version":3,"file":"xxmachina-common-domain-builder.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/domain/builder/command/command.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/command-action/command-action.types.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/command-action/command-action.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/command-action/command-action.helpers.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/er/er.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/query/query.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/notion-property-config.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/screen-item.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/xxmachina-common-domain-builder.ts"],"sourcesContent":["import { Command, OpenApi } from '@xxmachina/common/domain/models';\n\nexport class CommandBuilder {\n buildFromOpenApi(openApi: OpenApi): Command[] {\n return Object.keys(openApi.getPaths()).flatMap((path) => {\n return openApi.getMethods(path).map((method, index: number) => ({\n id: openApi.getOperationId(path, method) ?? `cmd-${index}`,\n name: openApi.getSummary(path, method) ?? '',\n description: openApi.getDescription(path, method) ?? '',\n type: 'webApiRequest' as const,\n webApiRequest: {\n path: path,\n method: method.toLocaleUpperCase(),\n contentType: openApi.getContentType(path, method) as 'application/json' | 'multipart/form-data',\n responseContentType: openApi.getResponseContentType(path, method) as 'application/octet-stream' | 'unknown',\n bodySchema: openApi.getRequestBodySchema(path, method),\n serverUrl: openApi.getServerUrl(),\n apiJsonUrl: openApi.apiJsonUrl,\n security: openApi.getSecurity(path, method) ?? [],\n }\n }));\n });\n }\n}\n","import { CreateActionsOptions } from '@ng-atomic/core';\n\nexport enum ActionId {\n NAVIGATE_TO_COMMAND_PAGE = '[@xxmachina/common] Navigate To Command Page',\n EXECUTE_COMMAND = '[@xxmachina/common] Execute Command',\n}\n\nexport interface CommandActionFactoryOptions extends CreateActionsOptions {\n queryId?: string;\n confirm?: () => Promise<boolean> | boolean;\n}\n\nexport interface CommandActionPayload<P> {\n command: any;\n body: P;\n options?: {\n confirm?: () => Promise<boolean> | boolean;\n queryId?: string;\n };\n}\n","import { Action, createAction } from '@ng-atomic/core';\nimport { flatten } from 'flat';\nimport { omitBy } from 'lodash-es';\nimport { createNavigateAction } from '@ng-atomic/components/frames/app';\nimport { NavigationExtras } from '@angular/router';\nimport { Command } from '@xxmachina/common/domain/models';\nimport { ActionId, CommandActionFactoryOptions, CommandActionPayload } from './command-action.types';\n\nexport class CommandActionsBuilder {\n private commands: Command[] = [];\n private options: CommandActionFactoryOptions = {};\n private item: any = null;\n private filterIds: string[] | null = null;\n private autoIds: string[] = [];\n\n private clone(): CommandActionsBuilder {\n const newFactory = new CommandActionsBuilder();\n newFactory.commands = [...this.commands];\n newFactory.options = { ...this.options };\n newFactory.item = this.item;\n newFactory.filterIds = this.filterIds ? [...this.filterIds] : null;\n newFactory.autoIds = [...this.autoIds];\n return newFactory;\n }\n\n setCommands(commands: Command[]): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.commands = [...commands];\n return newFactory;\n }\n\n setOptions(options: Partial<CommandActionFactoryOptions>): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.options = { ...this.options, ...options };\n return newFactory;\n }\n\n setItem(item: any): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.item = item;\n return newFactory;\n }\n\n setFilterIds(filterIds: (string | {id: string, auto: boolean})[] = []): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.filterIds = filterIds.map((id) => typeof id === 'string' ? id : id.id);\n newFactory.autoIds = filterIds.filter((id) => typeof id !== 'string' && id.auto).map((id) => (id as any).id);\n return newFactory;\n }\n\n setAutoIds(autoIds: string[]): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.autoIds = autoIds;\n return newFactory;\n }\n\n private applyFilter(commands: Command[]): Command[] {\n if (!this.filterIds) return commands;\n return this.filterIds.map((id) => commands.find((command) => command.id === id)!)\n .filter((command) => !!command) as Command[];\n }\n\n buildAction(id: string): Action {\n const command = this.commands.find((command) => command.id === id);\n if (!command) throw new Error(`Command not found: ${id}`);\n const actionId = this.autoIds.includes(command.id)\n ? ActionId.EXECUTE_COMMAND\n : ActionId.NAVIGATE_TO_COMMAND_PAGE;\n const creator = createAction<CommandActionPayload<any>>(\n actionId,\n command.webApiRequest.bodySchema,\n { name: command.name, icon: this.options.icon || 'default', ...this.options }\n );\n\n return creator.create({\n command,\n body: this.item,\n options: { queryId: this.options.queryId, confirm: this.options.confirm }\n });\n }\n\n buildActions(item?: any, navigationExtras: NavigationExtras = {}, overwrite: Partial<Action> = {}): Action[] {\n const filteredCommands = this.applyFilter(this.commands);\n return filteredCommands.map((command) => {\n if (this.autoIds.includes(command.id)) {\n return createAction<CommandActionPayload<any>>(\n ActionId.EXECUTE_COMMAND,\n command.webApiRequest.bodySchema,\n { name: command.name, icon: this.options.icon || 'default' }\n ).create({\n command,\n body: this.item,\n options: { queryId: this.options.queryId, confirm: this.options.confirm }\n }, overwrite);\n } else {\n const data = omitBy(flatten<object, object>({data: this.item, queryId: this.options.queryId}), value => typeof value === 'undefined');\n return createNavigateAction(['commands', {skip: true}, command.id, data], navigationExtras, {\n name: command.name,\n icon: this.options.icon,\n ...overwrite,\n });\n }\n });\n }\n\n buildItemActions<T>(): (item: T) => Action[] {\n return (item: T) => this.setItem(item).buildActions();\n }\n}\n\n// Re-export types for backward compatibility\nexport { ActionId, CommandActionFactoryOptions, CommandActionPayload } from './command-action.types';\n","import { Action } from '@ng-atomic/core';\nimport { NavigationExtras } from '@angular/router';\nimport { Command } from '@xxmachina/common/domain/models';\nimport { CommandActionsBuilder } from './command-action.builder';\nimport { CommandActionFactoryOptions } from './command-action.types';\n\n/**\n * コマンド用のナビゲーションアクションを作成\n */\nexport function createCommandNavigateAction(\n command: Command,\n navigationExtras: NavigationExtras = {},\n item: any = {},\n options: CommandActionFactoryOptions = {},\n overwrite: Partial<Action> = {}\n): Action | null {\n if (!command) return null;\n return new CommandActionsBuilder()\n .setItem(item)\n .setCommands([command])\n .setOptions(options)\n .setFilterIds([command.id])\n .buildActions(item, navigationExtras, overwrite)[0];\n}\n\n/**\n * コマンド用の実行アクションを作成\n */\nexport function createCommandExecutionAction(\n command: Command,\n item: any = {},\n options: CommandActionFactoryOptions = {},\n overwrite: Partial<Action> = {}\n): Action | null {\n if (!command) return null;\n return new CommandActionsBuilder()\n .setItem(item)\n .setCommands([command])\n .setOptions(options)\n .setFilterIds([command.id])\n .setAutoIds([command.id])\n .buildActions(item, undefined, overwrite)[0];\n}\n","interface Schema {\n name: string;\n fields: string[];\n relations: Relation[];\n}\n\ninterface Relation {\n source: string;\n target: string;\n label?: string;\n type?: string; // 例: \"||--o{\"\n}\n\nconst NOTION_PROP_TYPE_MAP = {\n people: 'string',\n unique_id: 'string',\n rich_text: 'string',\n title: 'string',\n text: 'string',\n number: 'number',\n select: 'enum',\n status: 'enum',\n multi_select: 'string',\n date: 'date',\n person: 'string',\n files: 'string',\n checkbox: 'boolean',\n url: 'string',\n email: 'string',\n phone_number: 'string',\n relation: 'string',\n rollup: 'string',\n created_time: 'date',\n created_by: 'string',\n last_edited_time: 'date',\n last_edited_by: 'string',\n};\n\nconst NOTION_KEY_MAP = {\n 'relation': 'FK',\n 'unique_id': 'UK',\n}\n\nexport class ErBuilder {\n build(databases: any[]): string {\n const schemas: Schema[] = [];\n const dbIdToName = databases.reduce((acc: Record<string, string>, db: any) => ({\n ...acc,\n [db.id]: db?.title?.[0]?.plain_text\n }), {});\n for (const database of databases) {\n const schema = this.parseDatabaseSchema(database, database?.title?.[0]?.plain_text, dbIdToName);\n schemas.push(schema);\n }\n return this.buildMermaidER(schemas);\n }\n\n parseDatabaseSchema(\n database: any,\n name = '',\n map: { [key: string]: string } = {},\n ): Schema {\n const properties = database.properties;\n const fields: string[] = [];\n const relations: Relation[] = [];\n \n Object.keys(properties)\n .filter(propName => {\n if (['formula', 'rollup', 'button'].includes(properties[propName].type)) return false;\n return true;\n })\n .sort()\n .forEach(propName => {\n const prop = properties[propName];\n const type = prop.type as keyof typeof NOTION_PROP_TYPE_MAP;\n const mappedType = NOTION_PROP_TYPE_MAP[type];\n const key = (NOTION_KEY_MAP as Record<string, string>)[type] ?? ' ';\n const field = `${mappedType} ${type} ${key} \"${propName}\"`;\n fields.push(field);\n \n // リレーションシップの解析\n if (type === 'relation') {\n const relation = prop['relation'];\n if (relation && relation.database_id) {\n const targetDbId = relation.database_id;\n const targetDbName = map[targetDbId] || 'Unknown';\n relations.push({\n source: name,\n target: targetDbName,\n label: propName,\n type: '||--||', // リレーションのタイプを適宜設定\n });\n } else if (relation && Array.isArray(relation)) {\n relation.forEach(rel => {\n const targetDbId = rel.database_id;\n const targetDbName = map[targetDbId] || 'Unknown';\n relations.push({\n source: name,\n target: targetDbName,\n label: propName,\n type: '||--o{',\n });\n });\n }\n }\n });\n \n return { name, fields, relations };\n }\n\n buildMermaidER(schemas: Schema[]): string {\n let mermaid = 'erDiagram\\n';\n \n // エンティティの定義\n schemas.forEach(schema => {\n mermaid += ` \"${schema.name}\" {\\n`;\n mermaid += schema.fields.map(field => ` ${field}`).join('\\n');\n mermaid += '\\n }\\n';\n });\n \n // リレーションシップの定義\n schemas.forEach(schema => {\n schema.relations.forEach(relation => {\n mermaid += ` \"${relation.source}\" ${relation.type} \"${relation.target}\" : \"${relation.label}\"\\n`;\n });\n });\n \n return mermaid;\n }\n}","import { message } from \"@nx-ddd/common\";\nimport { Query, QueryHelper } from \"@xxmachina/common/domain/models\";\nimport type { Dayjs } from \"dayjs\";\n\nexport class QueryBuilder {\n static buildByGraphql(graphql: {\n endpoint: string;\n query: string;\n headers: Record<string, string>;\n variables: Record<string, any>;\n transformerTs?: string;\n }, meta: Partial<Omit<Query, 'graphql'>> = {}): Query {\n return QueryHelper.tryParse({\n id: 'builded_query',\n type: 'graphql' as const,\n projectId: 'default',\n title: 'Builded Query',\n summary: 'This query was built by QueryBuilder',\n graphql: {\n endpoint: graphql.endpoint,\n query: message`${graphql.query}`,\n headersJson: JSON.stringify(graphql.headers),\n variablesJson: JSON.stringify(graphql.variables),\n transformerTs: (graphql?.transformerTs ?? null) as unknown as string,\n },\n createdAt: null as unknown as Dayjs,\n updatedAt: null as unknown as Dayjs,\n ...meta,\n });\n }\n}\n","import { ScreenItem } from '@xxmachina/common/domain/models';\n\n/**\n * Notionプロパティタイプ別の設定マッピング\n */\nexport interface NotionPropertyConfig {\n type: ScreenItem['type'];\n notionPropType: string;\n valueType: ScreenItem['valueType'];\n}\n\n/**\n * Notionプロパティタイプから画面項目設定へのマッピング\n */\nexport const NOTION_PROPERTY_CONFIG_MAP: Record<string, NotionPropertyConfig> = {\n select: { type: '入力(単一選択)', notionPropType: 'セレクト', valueType: 'string' },\n multi_select: { type: '入力(複数選択)', notionPropType: 'マルチセレクト', valueType: 'string' },\n relation: { type: '入力(単一選択)', notionPropType: 'リレーション', valueType: 'string' },\n rollup: { type: '表示', notionPropType: 'ロールアップ', valueType: 'string' },\n unique_id: { type: '表示', notionPropType: 'ユニークID', valueType: 'string' },\n created_time: { type: '表示', notionPropType: '作成日時', valueType: 'date' },\n created_by: { type: '表示', notionPropType: '作成者', valueType: 'string' },\n rich_text: { type: '入力(テキスト)', notionPropType: 'テキスト', valueType: 'string' },\n number: { type: '入力(数値)', notionPropType: '数値', valueType: 'number' },\n date: { type: '入力(日時)', notionPropType: '日時', valueType: 'date' },\n checkbox: { type: '入力(複数選択)', notionPropType: 'チェックボックス', valueType: 'boolean' },\n title: { type: '入力(テキスト)', notionPropType: 'タイトル', valueType: 'string' },\n people: { type: '入力(単一選択)', notionPropType: 'ユーザー', valueType: 'string' },\n last_edited_time: { type: '表示', notionPropType: '最終更新日時', valueType: 'date' },\n last_edited_by: { type: '表示', notionPropType: '最終更新者', valueType: 'string' },\n status: { type: '入力(単一選択)', notionPropType: 'ステータス', valueType: 'string' },\n formula: { type: '表示', notionPropType: '数式', valueType: 'any' },\n button: { type: 'ボタン', notionPropType: 'ボタン', valueType: 'string' },\n};\n\n/**\n * デフォルト設定(未知のプロパティタイプ用)\n */\nexport const DEFAULT_PROPERTY_CONFIG: NotionPropertyConfig = {\n type: '不明',\n notionPropType: '',\n valueType: 'string',\n};\n\n/**\n * プロパティタイプから設定を取得\n */\nexport function getPropertyConfig(propertyType: string): NotionPropertyConfig {\n return NOTION_PROPERTY_CONFIG_MAP[propertyType] ?? {\n ...DEFAULT_PROPERTY_CONFIG,\n notionPropType: propertyType,\n };\n}\n","import { ScreenItem } from '@xxmachina/common/domain/models';\nimport type { GetDatabaseResponse } from '@notionhq/client/build/src/api-endpoints';\nimport { Database } from '@xxmachina/common/domain/models';\nimport { getPropertyConfig } from './notion-property-config';\n\n/**\n * Notionプロパティから画面項目を構築\n */\nfunction buildPageItem(\n property: GetDatabaseResponse['properties'][string],\n propName: string,\n dbName: string,\n): ScreenItem {\n const config = getPropertyConfig(property.type);\n\n return {\n id: property?.['id'] ?? '',\n name: propName,\n type: config.type,\n notionPropType: config.notionPropType,\n formula: '',\n valueType: config.valueType,\n dbName,\n };\n}\n\n/**\n * データベースから画面項目リストを構築するビルダー\n */\nexport class ScreenItemBuilder {\n build(database: Database): ScreenItem[] {\n const items: ScreenItem[] = [];\n\n Object.entries(database?.properties ?? {}).sort((a, b) => {\n return a[0].localeCompare(b[0]);\n }).filter(([propName, prop]) => {\n return true;\n }).forEach(([propName, prop]) => {\n const item = buildPageItem(prop, propName, database?.title?.[0]?.plain_text ?? '');\n items.push(item);\n });\n\n return items;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAEa,cAAc,CAAA;AACzB,IAAA,gBAAgB,CAAC,OAAgB,EAAA;AAC/B,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AACtD,YAAA,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAa,MAAM;AAC9D,gBAAA,EAAE,EAAE,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAA,IAAA,EAAO,KAAK,CAAA,CAAE;gBAC1D,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE;gBAC5C,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE;AACvD,gBAAA,IAAI,EAAE,eAAwB;AAC9B,gBAAA,aAAa,EAAE;AACb,oBAAA,IAAI,EAAE,IAAI;AACV,oBAAA,MAAM,EAAE,MAAM,CAAC,iBAAiB,EAAE;oBAClC,WAAW,EAAE,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAA+C;oBAC/F,mBAAmB,EAAE,OAAO,CAAC,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAA2C;oBAC3G,UAAU,EAAE,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC;AACtD,oBAAA,SAAS,EAAE,OAAO,CAAC,YAAY,EAAE;oBACjC,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EA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EAAE,CAAC;AAClF,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAClB,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,KAAK;IACd;AACD;;AC5CD;;AAEG;;;;"}
1
+ {"version":3,"file":"xxmachina-common-domain-builder.mjs","sources":["../../../../../packages/@xxmachina/common/src/lib/domain/builder/command/command.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/command-action/command-action.types.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/command-action/command-action.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/command-action/command-action.helpers.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/er/er.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/query/query.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/notion-property-config.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/screen-item/screen-item.builder.ts","../../../../../packages/@xxmachina/common/src/lib/domain/builder/xxmachina-common-domain-builder.ts"],"sourcesContent":["import { Command, OpenApi } from '@xxmachina/common/domain/models';\n\nexport class CommandBuilder {\n buildFromOpenApi(openApi: OpenApi): Command[] {\n return Object.keys(openApi.getPaths()).flatMap((path) => {\n return openApi.getMethods(path).map((method, index: number) => ({\n id: openApi.getOperationId(path, method) ?? `cmd-${index}`,\n name: openApi.getSummary(path, method) ?? '',\n description: openApi.getDescription(path, method) ?? '',\n type: 'webApiRequest' as const,\n webApiRequest: {\n path: path,\n method: method.toLocaleUpperCase(),\n contentType: openApi.getContentType(path, method) as 'application/json' | 'multipart/form-data',\n responseContentType: openApi.getResponseContentType(path, method) as 'application/octet-stream' | 'unknown',\n bodySchema: openApi.getRequestBodySchema(path, method),\n serverUrl: openApi.getServerUrl(),\n apiJsonUrl: openApi.apiJsonUrl,\n security: openApi.getSecurity(path, method) ?? [],\n }\n }));\n });\n }\n}\n","import { CreateActionsOptions } from '@ng-atomic/core';\n\nexport enum ActionId {\n NAVIGATE_TO_COMMAND_PAGE = '[@xxmachina/common] Navigate To Command Page',\n EXECUTE_COMMAND = '[@xxmachina/common] Execute Command',\n}\n\nexport interface CommandActionFactoryOptions extends CreateActionsOptions {\n queryId?: string;\n confirm?: () => Promise<boolean> | boolean;\n}\n\nexport interface CommandActionPayload<P> {\n command: any;\n body: P;\n options?: {\n confirm?: () => Promise<boolean> | boolean;\n queryId?: string;\n };\n}\n","import { Action, createAction } from '@ng-atomic/core';\nimport { flatten } from 'flat';\nimport { omitBy } from 'lodash-es';\nimport { createNavigateAction } from '@ng-atomic/components/frames/app';\nimport { NavigationExtras } from '@angular/router';\nimport { Command } from '@xxmachina/common/domain/models';\nimport { ActionId, CommandActionFactoryOptions, CommandActionPayload } from './command-action.types';\n\nexport class CommandActionsBuilder {\n private commands: Command[] = [];\n private options: CommandActionFactoryOptions = {};\n private item: any = null;\n private filterIds: string[] | null = null;\n private autoIds: string[] = [];\n\n private clone(): CommandActionsBuilder {\n const newFactory = new CommandActionsBuilder();\n newFactory.commands = [...this.commands];\n newFactory.options = { ...this.options };\n newFactory.item = this.item;\n newFactory.filterIds = this.filterIds ? [...this.filterIds] : null;\n newFactory.autoIds = [...this.autoIds];\n return newFactory;\n }\n\n setCommands(commands: Command[]): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.commands = [...commands];\n return newFactory;\n }\n\n setOptions(options: Partial<CommandActionFactoryOptions>): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.options = { ...this.options, ...options };\n return newFactory;\n }\n\n setItem(item: any): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.item = item;\n return newFactory;\n }\n\n setFilterIds(filterIds: (string | {id: string, auto: boolean})[] = []): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.filterIds = filterIds.map((id) => typeof id === 'string' ? id : id.id);\n newFactory.autoIds = filterIds.filter((id) => typeof id !== 'string' && id.auto).map((id) => (id as any).id);\n return newFactory;\n }\n\n setAutoIds(autoIds: string[]): CommandActionsBuilder {\n const newFactory = this.clone();\n newFactory.autoIds = autoIds;\n return newFactory;\n }\n\n private applyFilter(commands: Command[]): Command[] {\n if (!this.filterIds) return commands;\n return this.filterIds.map((id) => commands.find((command) => command.id === id)!)\n .filter((command) => !!command) as Command[];\n }\n\n buildAction(id: string): Action {\n const command = this.commands.find((command) => command.id === id);\n if (!command) throw new Error(`Command not found: ${id}`);\n const actionId = this.autoIds.includes(command.id)\n ? ActionId.EXECUTE_COMMAND\n : ActionId.NAVIGATE_TO_COMMAND_PAGE;\n const creator = createAction<CommandActionPayload<any>>(\n actionId,\n command.webApiRequest.bodySchema,\n { name: command.name, icon: this.options.icon || 'default', ...this.options }\n );\n\n return creator.create({\n command,\n body: this.item,\n options: { queryId: this.options.queryId, confirm: this.options.confirm }\n });\n }\n\n buildActions(item?: any, navigationExtras: NavigationExtras = {}, overwrite: Partial<Action> = {}): Action[] {\n const filteredCommands = this.applyFilter(this.commands);\n return filteredCommands.map((command) => {\n if (this.autoIds.includes(command.id)) {\n return createAction<CommandActionPayload<any>>(\n ActionId.EXECUTE_COMMAND,\n command.webApiRequest.bodySchema,\n { name: command.name, icon: this.options.icon || 'default' }\n ).create({\n command,\n body: this.item,\n options: { queryId: this.options.queryId, confirm: this.options.confirm }\n }, overwrite);\n } else {\n const data = omitBy(flatten<object, object>({data: this.item, queryId: this.options.queryId}), value => typeof value === 'undefined');\n return createNavigateAction(['commands', {skip: true}, command.id, data], navigationExtras, {\n name: command.name,\n icon: this.options.icon,\n ...overwrite,\n });\n }\n });\n }\n\n buildItemActions<T>(): (item: T) => Action[] {\n return (item: T) => this.setItem(item).buildActions();\n }\n}\n\n\nexport { ActionId, CommandActionFactoryOptions, CommandActionPayload } from './command-action.types';\n","import { Action } from '@ng-atomic/core';\nimport { NavigationExtras } from '@angular/router';\nimport { Command } from '@xxmachina/common/domain/models';\nimport { CommandActionsBuilder } from './command-action.builder';\nimport { CommandActionFactoryOptions } from './command-action.types';\n\n\nexport function createCommandNavigateAction(\n command: Command,\n navigationExtras: NavigationExtras = {},\n item: any = {},\n options: CommandActionFactoryOptions = {},\n overwrite: Partial<Action> = {}\n): Action | null {\n if (!command) return null;\n return new CommandActionsBuilder()\n .setItem(item)\n .setCommands([command])\n .setOptions(options)\n .setFilterIds([command.id])\n .buildActions(item, navigationExtras, overwrite)[0];\n}\n\n\nexport function createCommandExecutionAction(\n command: Command,\n item: any = {},\n options: CommandActionFactoryOptions = {},\n overwrite: Partial<Action> = {}\n): Action | null {\n if (!command) return null;\n return new CommandActionsBuilder()\n .setItem(item)\n .setCommands([command])\n .setOptions(options)\n .setFilterIds([command.id])\n .setAutoIds([command.id])\n .buildActions(item, undefined, overwrite)[0];\n}\n","interface Schema {\n name: string;\n fields: string[];\n relations: Relation[];\n}\n\ninterface Relation {\n source: string;\n target: string;\n label?: string;\n type?: string; \n}\n\nconst NOTION_PROP_TYPE_MAP = {\n people: 'string',\n unique_id: 'string',\n rich_text: 'string',\n title: 'string',\n text: 'string',\n number: 'number',\n select: 'enum',\n status: 'enum',\n multi_select: 'string',\n date: 'date',\n person: 'string',\n files: 'string',\n checkbox: 'boolean',\n url: 'string',\n email: 'string',\n phone_number: 'string',\n relation: 'string',\n rollup: 'string',\n created_time: 'date',\n created_by: 'string',\n last_edited_time: 'date',\n last_edited_by: 'string',\n};\n\nconst NOTION_KEY_MAP = {\n 'relation': 'FK',\n 'unique_id': 'UK',\n}\n\nexport class ErBuilder {\n build(databases: any[]): string {\n const schemas: Schema[] = [];\n const dbIdToName = databases.reduce((acc: Record<string, string>, db: any) => ({\n ...acc,\n [db.id]: db?.title?.[0]?.plain_text\n }), {});\n for (const database of databases) {\n const schema = this.parseDatabaseSchema(database, database?.title?.[0]?.plain_text, dbIdToName);\n schemas.push(schema);\n }\n return this.buildMermaidER(schemas);\n }\n\n parseDatabaseSchema(\n database: any,\n name = '',\n map: { [key: string]: string } = {},\n ): Schema {\n const properties = database.properties;\n const fields: string[] = [];\n const relations: Relation[] = [];\n \n Object.keys(properties)\n .filter(propName => {\n if (['formula', 'rollup', 'button'].includes(properties[propName].type)) return false;\n return true;\n })\n .sort()\n .forEach(propName => {\n const prop = properties[propName];\n const type = prop.type as keyof typeof NOTION_PROP_TYPE_MAP;\n const mappedType = NOTION_PROP_TYPE_MAP[type];\n const key = (NOTION_KEY_MAP as Record<string, string>)[type] ?? ' ';\n const field = `${mappedType} ${type} ${key} \"${propName}\"`;\n fields.push(field);\n \n \n if (type === 'relation') {\n const relation = prop['relation'];\n if (relation && relation.database_id) {\n const targetDbId = relation.database_id;\n const targetDbName = map[targetDbId] || 'Unknown';\n relations.push({\n source: name,\n target: targetDbName,\n label: propName,\n type: '||--||', \n });\n } else if (relation && Array.isArray(relation)) {\n relation.forEach(rel => {\n const targetDbId = rel.database_id;\n const targetDbName = map[targetDbId] || 'Unknown';\n relations.push({\n source: name,\n target: targetDbName,\n label: propName,\n type: '||--o{',\n });\n });\n }\n }\n });\n \n return { name, fields, relations };\n }\n\n buildMermaidER(schemas: Schema[]): string {\n let mermaid = 'erDiagram\\n';\n \n \n schemas.forEach(schema => {\n mermaid += ` \"${schema.name}\" {\\n`;\n mermaid += schema.fields.map(field => ` ${field}`).join('\\n');\n mermaid += '\\n }\\n';\n });\n \n \n schemas.forEach(schema => {\n schema.relations.forEach(relation => {\n mermaid += ` \"${relation.source}\" ${relation.type} \"${relation.target}\" : \"${relation.label}\"\\n`;\n });\n });\n \n return mermaid;\n }\n}","import { message } from \"@nx-ddd/common\";\nimport { Query, QueryHelper } from \"@xxmachina/common/domain/models\";\nimport type { Dayjs } from \"dayjs\";\n\nexport class QueryBuilder {\n static buildByGraphql(graphql: {\n endpoint: string;\n query: string;\n headers: Record<string, string>;\n variables: Record<string, any>;\n transformerTs?: string;\n }, meta: Partial<Omit<Query, 'graphql'>> = {}): Query {\n return QueryHelper.tryParse({\n id: 'builded_query',\n type: 'graphql' as const,\n projectId: 'default',\n title: 'Builded Query',\n summary: 'This query was built by QueryBuilder',\n graphql: {\n endpoint: graphql.endpoint,\n query: message`${graphql.query}`,\n headersJson: JSON.stringify(graphql.headers),\n variablesJson: JSON.stringify(graphql.variables),\n transformerTs: (graphql?.transformerTs ?? null) as unknown as string,\n },\n createdAt: null as unknown as Dayjs,\n updatedAt: null as unknown as Dayjs,\n ...meta,\n });\n }\n}\n","import { ScreenItem } from '@xxmachina/common/domain/models';\n\n\nexport interface NotionPropertyConfig {\n type: ScreenItem['type'];\n notionPropType: string;\n valueType: ScreenItem['valueType'];\n}\n\n\nexport const NOTION_PROPERTY_CONFIG_MAP: Record<string, NotionPropertyConfig> = {\n select: { type: '入力(単一選択)', notionPropType: 'セレクト', valueType: 'string' },\n multi_select: { type: '入力(複数選択)', notionPropType: 'マルチセレクト', valueType: 'string' },\n relation: { type: '入力(単一選択)', notionPropType: 'リレーション', valueType: 'string' },\n rollup: { type: '表示', notionPropType: 'ロールアップ', valueType: 'string' },\n unique_id: { type: '表示', notionPropType: 'ユニークID', valueType: 'string' },\n created_time: { type: '表示', notionPropType: '作成日時', valueType: 'date' },\n created_by: { type: '表示', notionPropType: '作成者', valueType: 'string' },\n rich_text: { type: '入力(テキスト)', notionPropType: 'テキスト', valueType: 'string' },\n number: { type: '入力(数値)', notionPropType: '数値', valueType: 'number' },\n date: { type: '入力(日時)', notionPropType: '日時', valueType: 'date' },\n checkbox: { type: '入力(複数選択)', notionPropType: 'チェックボックス', valueType: 'boolean' },\n title: { type: '入力(テキスト)', notionPropType: 'タイトル', valueType: 'string' },\n people: { type: '入力(単一選択)', notionPropType: 'ユーザー', valueType: 'string' },\n last_edited_time: { type: '表示', notionPropType: '最終更新日時', valueType: 'date' },\n last_edited_by: { type: '表示', notionPropType: '最終更新者', valueType: 'string' },\n status: { type: '入力(単一選択)', notionPropType: 'ステータス', valueType: 'string' },\n formula: { type: '表示', notionPropType: '数式', valueType: 'any' },\n button: { type: 'ボタン', notionPropType: 'ボタン', valueType: 'string' },\n};\n\n\nexport const DEFAULT_PROPERTY_CONFIG: NotionPropertyConfig = {\n type: '不明',\n notionPropType: '',\n valueType: 'string',\n};\n\n\nexport function getPropertyConfig(propertyType: string): NotionPropertyConfig {\n return NOTION_PROPERTY_CONFIG_MAP[propertyType] ?? {\n ...DEFAULT_PROPERTY_CONFIG,\n notionPropType: propertyType,\n };\n}\n","import { ScreenItem } from '@xxmachina/common/domain/models';\nimport type { GetDatabaseResponse } from '@notionhq/client/build/src/api-endpoints';\nimport { Database } from '@xxmachina/common/domain/models';\nimport { getPropertyConfig } from './notion-property-config';\n\n\nfunction buildPageItem(\n property: GetDatabaseResponse['properties'][string],\n propName: string,\n dbName: string,\n): ScreenItem {\n const config = getPropertyConfig(property.type);\n\n return {\n id: property?.['id'] ?? '',\n name: propName,\n type: config.type,\n notionPropType: config.notionPropType,\n formula: '',\n valueType: config.valueType,\n dbName,\n };\n}\n\n\nexport class ScreenItemBuilder {\n build(database: Database): ScreenItem[] {\n const items: ScreenItem[] = [];\n\n Object.entries(database?.properties ?? {}).sort((a, b) => {\n return a[0].localeCompare(b[0]);\n }).filter(([propName, prop]) => {\n return true;\n }).forEach(([propName, prop]) => {\n const item = buildPageItem(prop, propName, database?.title?.[0]?.plain_text ?? '');\n items.push(item);\n });\n\n return items;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAEa,cAAc,CAAA;AACzB,IAAA,gBAAgB,CAAC,OAAgB,EAAA;AAC/B,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AACtD,YAAA,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAa,MAAM;AAC9D,gBAAA,EAAE,EAAE,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAA,IAAA,EAAO,KAAK,CAAA,CAAE;gBAC1D,IAAI,EAAE,OAAO,CA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AK,CAAC,QAAkB,EAAA;QACtB,MAAM,KAAK,GAAiB,EAAE;AAE9B,QAAA,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;AACvD,YAAA,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAI;AAC7B,YAAA,OAAO,IAAI;QACb,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAI;YAC9B,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,UAAU,IAAI,EAAE,CAAC;AAClF,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;AAClB,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,KAAK;IACd;AACD;;ACxCD;;AAEG;;;;"}
@@ -199,7 +199,6 @@ class OpenApi {
199
199
  }
200
200
  getServerUrl() {
201
201
  return this.openApi?.servers?.[0]?.url;
202
- // ?? (this.openApi. as string).replace(/\/api-json$/, '/api'),
203
202
  }
204
203
  }
205
204
  class OpenApiHelper {
@@ -254,9 +253,6 @@ var AiType;
254
253
  AiType["AZURE_OPEN_AI"] = "azureopenai";
255
254
  })(AiType || (AiType = {}));
256
255
 
257
- /**
258
- * クエリのバリデーション関連ヘルパー
259
- */
260
256
  class QueryValidationHelper {
261
257
  static validate(query) {
262
258
  if (query.graphql.endpoint === '')
@@ -294,9 +290,6 @@ class QueryValidationHelper {
294
290
  }
295
291
  }
296
292
 
297
- /**
298
- * クエリ結果処理関連ヘルパー
299
- */
300
293
  class QueryResultHelper {
301
294
  static getResult(result, key = Object.keys(result)[0]) {
302
295
  return deepSnakeToCamelCase(result[key][0]);
@@ -368,9 +361,6 @@ class QueryResultHelper {
368
361
  }
369
362
  return results;
370
363
  }
371
- /**
372
- * @deprecated
373
- */
374
364
  static convertToV2(query) {
375
365
  if (query?.type === 'graphql')
376
366
  return query;
@@ -393,18 +383,12 @@ class QueryResultHelper {
393
383
  }
394
384
  }
395
385
 
396
- /**
397
- * クエリ操作のメインヘルパー
398
- * バリデーション・結果処理は専用ヘルパーに委譲
399
- */
400
386
  class QueryHelper {
401
- // Validation methods (delegated)
402
387
  static validate = QueryValidationHelper.validate.bind(QueryValidationHelper);
403
388
  static validateGraphqlQuery = QueryValidationHelper.validateGraphqlQuery.bind(QueryValidationHelper);
404
389
  static tryParseJson = QueryValidationHelper.tryParseJson.bind(QueryValidationHelper);
405
390
  static isParseableJson = QueryValidationHelper.isParseableJson.bind(QueryValidationHelper);
406
391
  static isExecutableGetSchemaGraphql = QueryValidationHelper.isExecutableGetSchemaGraphql.bind(QueryValidationHelper);
407
- // Result methods (delegated)
408
392
  static getResult = QueryResultHelper.getResult.bind(QueryResultHelper);
409
393
  static getResultErrors = QueryResultHelper.getResultErrors.bind(QueryResultHelper);
410
394
  static throwResultError = QueryResultHelper.throwResultError.bind(QueryResultHelper);
@@ -484,7 +468,7 @@ class QueryHelper {
484
468
  }, null, 2),
485
469
  headersJson: JSON.stringify({
486
470
  "content-type": "application/json",
487
- "Authorization": "Bearer $MACHINA_AUTH_ACCESS_TOKEN"
471
+ "Authorization": "Bearer $PLANX_AUTH_ACCESS_TOKEN"
488
472
  }, null, 2),
489
473
  query: ``,
490
474
  },
@@ -786,8 +770,6 @@ function buildCalendarDate(dates) {
786
770
  const maxDate = dates.reduce((max, date) => date.date.isAfter(max) ? date.date : max, dates[0].date);
787
771
  const startDate = minDate.clone().startOf('week');
788
772
  const endDate = maxDate.clone().endOf('week');
789
- // console.debug('startDate', startDate.format('YYYY/MM/DD'));
790
- // console.debug('endDate', endDate.format('YYYY/MM/DD'));
791
773
  const month = [];
792
774
  let date = startDate.clone();
793
775
  while (date.isBefore(endDate)) {