@nexusclawhq/cli 0.3.72 → 0.3.74
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/CHANGELOG.md +6 -0
- package/dist/build-info.json +4 -4
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.d.ts +59 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.js +57 -2
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/en-US.js.map +1 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/index.d.ts +118 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.d.ts +59 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.js +57 -2
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/locales/zh-CN.js.map +1 -1
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/actions.d.ts +22 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/actions.js +156 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/actions.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/duplicate.d.ts +20 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/duplicate.js +39 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/duplicate.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/fieldPolicy.d.ts +38 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/fieldPolicy.js +193 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/fieldPolicy.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/icons.d.ts +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/icons.js +196 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/icons.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/identity.d.ts +11 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/identity.js +29 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/identity.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/index.d.ts +9 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/index.js +26 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/index.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/recordTypeSemantics.d.ts +23 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/recordTypeSemantics.js +78 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/recordTypeSemantics.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/recordTypes.d.ts +24 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/recordTypes.js +24 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/recordTypes.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/sharing.d.ts +13 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/sharing.js +26 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/sharing.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/visibility.d.ts +211 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/visibility.js +411 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/visibility.js.map +1 -0
- package/dist/nexus-cli/node_modules/@nexusclaw/shared/package.json +4 -0
- package/dist/nexus-cli/src/commands/data/query.d.ts +5 -0
- package/dist/nexus-cli/src/commands/data/query.js +12 -6
- package/dist/nexus-cli/src/commands/data/query.js.map +1 -1
- package/dist/nexus-cli/src/commands/data/query.test.js +33 -0
- package/dist/nexus-cli/src/commands/data/query.test.js.map +1 -1
- package/dist/nexus-cli/src/commands/source/status.d.ts +7 -0
- package/dist/nexus-cli/src/commands/source/status.js +26 -1
- package/dist/nexus-cli/src/commands/source/status.js.map +1 -1
- package/dist/nexus-cli/src/commands/source/status.test.d.ts +1 -0
- package/dist/nexus-cli/src/commands/source/status.test.js +55 -0
- package/dist/nexus-cli/src/commands/source/status.test.js.map +1 -0
- package/dist/nexus-cli/src/commands/test/report.js +36 -27
- package/dist/nexus-cli/src/commands/test/report.js.map +1 -1
- package/dist/nexus-cli/src/services/workforce-test-remote.d.ts +1 -1
- package/dist/nexus-cli/src/services/workforce-test-remote.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RECORD_METADATA_ICONS = void 0;
|
|
4
|
+
exports.RECORD_METADATA_ICONS = {
|
|
5
|
+
IconBuildingSkyscraper: 'BankOutlined',
|
|
6
|
+
IconBuilding: 'BankOutlined',
|
|
7
|
+
IconBuildingStore: 'ShopOutlined',
|
|
8
|
+
IconBuildingWarehouse: 'HomeOutlined',
|
|
9
|
+
IconBuildingFactory: 'BuildOutlined',
|
|
10
|
+
IconBuildingBank: 'BankOutlined',
|
|
11
|
+
IconBuildingHospital: 'SafetyOutlined',
|
|
12
|
+
IconBuildingChurch: 'HomeOutlined',
|
|
13
|
+
IconBuildingCommunity: 'TeamOutlined',
|
|
14
|
+
IconUser: 'UserOutlined',
|
|
15
|
+
IconUsers: 'TeamOutlined',
|
|
16
|
+
IconUserCircle: 'UserOutlined',
|
|
17
|
+
IconUserPlus: 'UserOutlined',
|
|
18
|
+
IconUserMinus: 'UserOutlined',
|
|
19
|
+
IconUserCheck: 'UserOutlined',
|
|
20
|
+
IconUserX: 'UserOutlined',
|
|
21
|
+
IconUserSearch: 'UserOutlined',
|
|
22
|
+
IconTargetArrow: 'AimOutlined',
|
|
23
|
+
IconTarget: 'AimOutlined',
|
|
24
|
+
IconBriefcase: 'SolutionOutlined',
|
|
25
|
+
IconCash: 'DollarOutlined',
|
|
26
|
+
IconCoin: 'DollarOutlined',
|
|
27
|
+
IconCurrency: 'DollarOutlined',
|
|
28
|
+
IconCurrencyDollar: 'DollarOutlined',
|
|
29
|
+
IconCurrencyEuro: 'DollarOutlined',
|
|
30
|
+
IconCurrencyYen: 'DollarOutlined',
|
|
31
|
+
IconCurrencyPound: 'DollarOutlined',
|
|
32
|
+
IconReceipt: 'FileTextOutlined',
|
|
33
|
+
IconInvoice: 'FileTextOutlined',
|
|
34
|
+
IconCheckbox: 'CheckSquareOutlined',
|
|
35
|
+
IconCheck: 'CheckSquareOutlined',
|
|
36
|
+
IconChecklist: 'CheckSquareOutlined',
|
|
37
|
+
IconCalendarEvent: 'CalendarOutlined',
|
|
38
|
+
IconCalendar: 'CalendarOutlined',
|
|
39
|
+
IconCalendarTime: 'CalendarOutlined',
|
|
40
|
+
IconCalendarStats: 'CalendarOutlined',
|
|
41
|
+
IconClock: 'ScheduleOutlined',
|
|
42
|
+
IconAlarm: 'BellOutlined',
|
|
43
|
+
IconBell: 'BellOutlined',
|
|
44
|
+
IconMail: 'MailOutlined',
|
|
45
|
+
IconMailOpened: 'MailOutlined',
|
|
46
|
+
IconMailForward: 'MailOutlined',
|
|
47
|
+
IconInbox: 'InboxOutlined',
|
|
48
|
+
IconSend: 'MailOutlined',
|
|
49
|
+
IconPhone: 'PhoneOutlined',
|
|
50
|
+
IconPhoneCall: 'PhoneOutlined',
|
|
51
|
+
IconPhoneIncoming: 'PhoneOutlined',
|
|
52
|
+
IconPhoneOutgoing: 'PhoneOutlined',
|
|
53
|
+
IconMessage: 'MessageOutlined',
|
|
54
|
+
IconMessageCircle: 'MessageOutlined',
|
|
55
|
+
IconMessages: 'CommentOutlined',
|
|
56
|
+
IconChat: 'CommentOutlined',
|
|
57
|
+
IconFile: 'FileOutlined',
|
|
58
|
+
IconFileText: 'FileTextOutlined',
|
|
59
|
+
IconFileDescription: 'FileTextOutlined',
|
|
60
|
+
IconFileAnalytics: 'FileSearchOutlined',
|
|
61
|
+
IconFileReport: 'FileDoneOutlined',
|
|
62
|
+
IconFileInvoice: 'FileTextOutlined',
|
|
63
|
+
IconFileSpreadsheet: 'FileExcelOutlined',
|
|
64
|
+
IconFileCode: 'CodeOutlined',
|
|
65
|
+
IconFileZip: 'FileZipOutlined',
|
|
66
|
+
IconFilePdf: 'FilePdfOutlined',
|
|
67
|
+
IconFileWord: 'FileWordOutlined',
|
|
68
|
+
IconFileExcel: 'FileExcelOutlined',
|
|
69
|
+
IconFileImage: 'FileImageOutlined',
|
|
70
|
+
IconFolder: 'FolderOutlined',
|
|
71
|
+
IconFolderOpen: 'FolderOpenOutlined',
|
|
72
|
+
IconFolderPlus: 'FolderAddOutlined',
|
|
73
|
+
IconChartBar: 'BarChartOutlined',
|
|
74
|
+
IconChartLine: 'LineChartOutlined',
|
|
75
|
+
IconChartPie: 'PieChartOutlined',
|
|
76
|
+
IconChartDots: 'DotChartOutlined',
|
|
77
|
+
IconChartArea: 'FundOutlined',
|
|
78
|
+
IconChartArrows: 'StockOutlined',
|
|
79
|
+
IconTrendingUp: 'RiseOutlined',
|
|
80
|
+
IconTrendingDown: 'FallOutlined',
|
|
81
|
+
IconGraph: 'LineChartOutlined',
|
|
82
|
+
IconPresentation: 'FundProjectionScreenOutlined',
|
|
83
|
+
IconSettings: 'SettingOutlined',
|
|
84
|
+
IconSettingsAutomation: 'SettingOutlined',
|
|
85
|
+
IconTool: 'ToolOutlined',
|
|
86
|
+
IconTools: 'ToolOutlined',
|
|
87
|
+
IconAdjustments: 'SettingOutlined',
|
|
88
|
+
IconSliders: 'SettingOutlined',
|
|
89
|
+
IconLock: 'LockOutlined',
|
|
90
|
+
IconLockOpen: 'UnlockOutlined',
|
|
91
|
+
IconKey: 'KeyOutlined',
|
|
92
|
+
IconShield: 'SafetyOutlined',
|
|
93
|
+
IconShieldCheck: 'SafetyOutlined',
|
|
94
|
+
IconShieldLock: 'SafetyOutlined',
|
|
95
|
+
IconFingerprint: 'SafetyOutlined',
|
|
96
|
+
IconHome: 'HomeOutlined',
|
|
97
|
+
IconMap: 'EnvironmentOutlined',
|
|
98
|
+
IconMapPin: 'PushpinOutlined',
|
|
99
|
+
IconLocation: 'EnvironmentOutlined',
|
|
100
|
+
IconCompass: 'CompassOutlined',
|
|
101
|
+
IconNavigation: 'CompassOutlined',
|
|
102
|
+
IconWorld: 'GlobalOutlined',
|
|
103
|
+
IconGlobe: 'GlobalOutlined',
|
|
104
|
+
IconStar: 'StarOutlined',
|
|
105
|
+
IconStarFilled: 'StarOutlined',
|
|
106
|
+
IconHeart: 'HeartOutlined',
|
|
107
|
+
IconHeartFilled: 'HeartOutlined',
|
|
108
|
+
IconFlag: 'FlagOutlined',
|
|
109
|
+
IconBookmark: 'TagOutlined',
|
|
110
|
+
IconTag: 'TagOutlined',
|
|
111
|
+
IconTags: 'TagOutlined',
|
|
112
|
+
IconLabel: 'TagOutlined',
|
|
113
|
+
IconRocket: 'RocketOutlined',
|
|
114
|
+
IconBolt: 'ThunderboltOutlined',
|
|
115
|
+
IconFlame: 'FireOutlined',
|
|
116
|
+
IconCrown: 'CrownOutlined',
|
|
117
|
+
IconTrophy: 'TrophyOutlined',
|
|
118
|
+
IconGift: 'GiftOutlined',
|
|
119
|
+
IconCar: 'CarOutlined',
|
|
120
|
+
IconCoffee: 'CoffeeOutlined',
|
|
121
|
+
IconBook: 'BookOutlined',
|
|
122
|
+
IconBulb: 'BulbOutlined',
|
|
123
|
+
IconLightbulb: 'BulbOutlined',
|
|
124
|
+
IconIdea: 'BulbOutlined',
|
|
125
|
+
IconEye: 'EyeOutlined',
|
|
126
|
+
IconView: 'EyeOutlined',
|
|
127
|
+
IconDatabase: 'DatabaseOutlined',
|
|
128
|
+
IconCloud: 'CloudOutlined',
|
|
129
|
+
IconServer: 'DatabaseOutlined',
|
|
130
|
+
IconApi: 'ApiOutlined',
|
|
131
|
+
IconCode: 'CodeOutlined',
|
|
132
|
+
IconTerminal: 'ConsoleSqlOutlined',
|
|
133
|
+
IconBug: 'BugOutlined',
|
|
134
|
+
IconRobot: 'RobotOutlined',
|
|
135
|
+
IconBrain: 'ExperimentOutlined',
|
|
136
|
+
IconTable: 'TableOutlined',
|
|
137
|
+
IconList: 'ProfileOutlined',
|
|
138
|
+
IconGrid: 'AppstoreOutlined',
|
|
139
|
+
IconLayout: 'BlockOutlined',
|
|
140
|
+
IconLayoutGrid: 'AppstoreOutlined',
|
|
141
|
+
IconLayoutList: 'ProfileOutlined',
|
|
142
|
+
IconLayoutKanban: 'ProjectOutlined',
|
|
143
|
+
IconLayoutBoard: 'ProjectOutlined',
|
|
144
|
+
IconLink: 'LinkOutlined',
|
|
145
|
+
IconExternalLink: 'LinkOutlined',
|
|
146
|
+
IconShare: 'ShareAltOutlined',
|
|
147
|
+
IconBranch: 'BranchesOutlined',
|
|
148
|
+
IconGitBranch: 'BranchesOutlined',
|
|
149
|
+
IconGitMerge: 'MergeOutlined',
|
|
150
|
+
IconGitPullRequest: 'PullRequestOutlined',
|
|
151
|
+
IconGitFork: 'ForkOutlined',
|
|
152
|
+
IconApps: 'AppstoreOutlined',
|
|
153
|
+
IconAppWindow: 'AppstoreOutlined',
|
|
154
|
+
IconBrowser: 'ChromeOutlined',
|
|
155
|
+
IconDevices: 'AppstoreOutlined',
|
|
156
|
+
IconAddressBook: 'ContactsOutlined',
|
|
157
|
+
IconContacts: 'ContactsOutlined',
|
|
158
|
+
IconId: 'IdcardOutlined',
|
|
159
|
+
IconIdBadge: 'IdcardOutlined',
|
|
160
|
+
IconIdCard: 'IdcardOutlined',
|
|
161
|
+
IconProject: 'ProjectOutlined',
|
|
162
|
+
IconKanban: 'ProjectOutlined',
|
|
163
|
+
IconBoard: 'ProjectOutlined',
|
|
164
|
+
IconClipboard: 'ContainerOutlined',
|
|
165
|
+
IconClipboardList: 'ContainerOutlined',
|
|
166
|
+
IconClipboardCheck: 'AuditOutlined',
|
|
167
|
+
IconNotification: 'NotificationOutlined',
|
|
168
|
+
IconAnnouncement: 'SoundOutlined',
|
|
169
|
+
IconSpeaker: 'SoundOutlined',
|
|
170
|
+
IconMegaphone: 'NotificationOutlined',
|
|
171
|
+
IconHelp: 'CustomerServiceOutlined',
|
|
172
|
+
IconSupport: 'CustomerServiceOutlined',
|
|
173
|
+
IconHeadphones: 'CustomerServiceOutlined',
|
|
174
|
+
IconLifebuoy: 'SafetyOutlined',
|
|
175
|
+
IconBrandGithub: 'GithubOutlined',
|
|
176
|
+
IconBrandGitlab: 'GitlabOutlined',
|
|
177
|
+
IconBrandGoogle: 'GoogleOutlined',
|
|
178
|
+
IconBrandTwitter: 'TwitterOutlined',
|
|
179
|
+
IconBrandFacebook: 'FacebookOutlined',
|
|
180
|
+
IconBrandLinkedin: 'LinkedinOutlined',
|
|
181
|
+
IconBrandInstagram: 'InstagramOutlined',
|
|
182
|
+
IconBrandYoutube: 'YoutubeOutlined',
|
|
183
|
+
IconBrandSlack: 'SlackOutlined',
|
|
184
|
+
IconBrandSkype: 'SkypeOutlined',
|
|
185
|
+
IconBrandReddit: 'RedditOutlined',
|
|
186
|
+
IconBrandMedium: 'MediumOutlined',
|
|
187
|
+
IconBrandDribbble: 'DribbbleOutlined',
|
|
188
|
+
IconBrandBehance: 'BehanceOutlined',
|
|
189
|
+
IconBrandWechat: 'WechatOutlined',
|
|
190
|
+
IconBrandWeibo: 'WeiboOutlined',
|
|
191
|
+
IconBrandAlipay: 'AlipayOutlined',
|
|
192
|
+
IconBrandTaobao: 'TaobaoOutlined',
|
|
193
|
+
IconBrandDingding: 'DingdingOutlined',
|
|
194
|
+
IconBrandZhihu: 'ZhihuOutlined',
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=icons.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AAe,EAAE,gBAAgB;IACjC,eAAe,EAAE,gBAAgB;IACjC,iBAAiB,EAAE,kBAAkB;IACrC,gBAAgB,EAAE,iBAAiB;IACnC,eAAe,EAAE,gBAAgB;IACjC,cAAc,EAAE,eAAe;IAC/B,eAAe,EAAE,gBAAgB;IACjC,eAAe,EAAE,gBAAgB;IACjC,iBAAiB,EAAE,kBAAkB;IACrC,cAAc,EAAE,eAAe;CAChC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* record-home-header-shell-v1 — deterministic per-object identity color.
|
|
3
|
+
*
|
|
4
|
+
* Salesforce gives each object a signature hue on its record-header icon
|
|
5
|
+
* badge. Object metadata carries no color today, so the hue is derived
|
|
6
|
+
* client-side from the object name: stable hash → fixed SLDS-style palette.
|
|
7
|
+
* Same object → same color everywhere, no storage or data access.
|
|
8
|
+
*/
|
|
9
|
+
/** SLDS-inspired object hue palette (stable, brand-consistent). */
|
|
10
|
+
export declare const OBJECT_IDENTITY_PALETTE: readonly ["#0176d3", "#2e844a", "#dd7a01", "#9050e9", "#ba0517", "#1b96ff"];
|
|
11
|
+
export declare function resolveObjectIconColor(nameSingular: string): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* record-home-header-shell-v1 — deterministic per-object identity color.
|
|
4
|
+
*
|
|
5
|
+
* Salesforce gives each object a signature hue on its record-header icon
|
|
6
|
+
* badge. Object metadata carries no color today, so the hue is derived
|
|
7
|
+
* client-side from the object name: stable hash → fixed SLDS-style palette.
|
|
8
|
+
* Same object → same color everywhere, no storage or data access.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.OBJECT_IDENTITY_PALETTE = void 0;
|
|
12
|
+
exports.resolveObjectIconColor = resolveObjectIconColor;
|
|
13
|
+
/** SLDS-inspired object hue palette (stable, brand-consistent). */
|
|
14
|
+
exports.OBJECT_IDENTITY_PALETTE = [
|
|
15
|
+
"#0176d3", // brand blue (info)
|
|
16
|
+
"#2e844a", // success green
|
|
17
|
+
"#dd7a01", // warning orange
|
|
18
|
+
"#9050e9", // purple
|
|
19
|
+
"#ba0517", // error red
|
|
20
|
+
"#1b96ff", // sky
|
|
21
|
+
];
|
|
22
|
+
function resolveObjectIconColor(nameSingular) {
|
|
23
|
+
let hash = 0;
|
|
24
|
+
for (let i = 0; i < nameSingular.length; i++) {
|
|
25
|
+
hash = (hash * 31 + nameSingular.charCodeAt(i)) % 997;
|
|
26
|
+
}
|
|
27
|
+
return exports.OBJECT_IDENTITY_PALETTE[hash % exports.OBJECT_IDENTITY_PALETTE.length] ?? "#0176d3";
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/record-home/identity.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAYH,wDAMC;AAhBD,mEAAmE;AACtD,QAAA,uBAAuB,GAAG;IACrC,SAAS,EAAE,oBAAoB;IAC/B,SAAS,EAAE,gBAAgB;IAC3B,SAAS,EAAE,iBAAiB;IAC5B,SAAS,EAAE,SAAS;IACpB,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,MAAM;CACT,CAAC;AAEX,SAAgB,sBAAsB,CAAC,YAAoB;IACzD,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7C,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IACxD,CAAC;IACD,OAAO,+BAAuB,CAAC,IAAI,GAAG,+BAAuB,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './actions';
|
|
2
|
+
export * from './fieldPolicy';
|
|
3
|
+
export * from './duplicate';
|
|
4
|
+
export * from './visibility';
|
|
5
|
+
export * from './identity';
|
|
6
|
+
export * from './recordTypes';
|
|
7
|
+
export * from './recordTypeSemantics';
|
|
8
|
+
export * from './sharing';
|
|
9
|
+
export * from './icons';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./actions"), exports);
|
|
18
|
+
__exportStar(require("./fieldPolicy"), exports);
|
|
19
|
+
__exportStar(require("./duplicate"), exports);
|
|
20
|
+
__exportStar(require("./visibility"), exports);
|
|
21
|
+
__exportStar(require("./identity"), exports);
|
|
22
|
+
__exportStar(require("./recordTypes"), exports);
|
|
23
|
+
__exportStar(require("./recordTypeSemantics"), exports);
|
|
24
|
+
__exportStar(require("./sharing"), exports);
|
|
25
|
+
__exportStar(require("./icons"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/record-home/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B;AAC7B,6CAA2B;AAC3B,gDAA8B;AAC9B,wDAAsC;AACtC,4CAA0B;AAC1B,0CAAwB"}
|
package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/recordTypeSemantics.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Stable metadata semantics shared by record writes, desktop and mobile. */
|
|
2
|
+
export interface BusinessProcessSemantics {
|
|
3
|
+
lifecycleFieldMetadataId: string;
|
|
4
|
+
values: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface RecordTypeSemantics {
|
|
7
|
+
picklistValues?: Record<string, string[]> | null;
|
|
8
|
+
businessProcess?: BusinessProcessSemantics | null;
|
|
9
|
+
}
|
|
10
|
+
export interface RecordTypeField {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: string;
|
|
14
|
+
options?: Array<{
|
|
15
|
+
value: string;
|
|
16
|
+
label?: string;
|
|
17
|
+
}> | null;
|
|
18
|
+
}
|
|
19
|
+
export declare function recordTypeAllowedValues(fieldId: string, semantics?: RecordTypeSemantics | null): string[] | undefined;
|
|
20
|
+
export declare function applyRecordTypeFieldOptions<T extends RecordTypeField>(fields: T[], semantics?: RecordTypeSemantics | null): T[];
|
|
21
|
+
/** Returns a stable diagnostic; config validation is owned by the backend. */
|
|
22
|
+
export declare function recordTypeConfigurationError(fields: RecordTypeField[], semantics: RecordTypeSemantics): string | undefined;
|
|
23
|
+
export declare function invalidRecordTypeFields(fields: RecordTypeField[], semantics: RecordTypeSemantics | null | undefined, data: Record<string, unknown>, existing?: Record<string, unknown>): string[];
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.recordTypeAllowedValues = recordTypeAllowedValues;
|
|
4
|
+
exports.applyRecordTypeFieldOptions = applyRecordTypeFieldOptions;
|
|
5
|
+
exports.recordTypeConfigurationError = recordTypeConfigurationError;
|
|
6
|
+
exports.invalidRecordTypeFields = invalidRecordTypeFields;
|
|
7
|
+
function recordTypeAllowedValues(fieldId, semantics) {
|
|
8
|
+
if (semantics?.businessProcess?.lifecycleFieldMetadataId === fieldId) {
|
|
9
|
+
return semantics.businessProcess.values;
|
|
10
|
+
}
|
|
11
|
+
const subsets = semantics?.picklistValues;
|
|
12
|
+
return subsets && Object.prototype.hasOwnProperty.call(subsets, fieldId)
|
|
13
|
+
? subsets[fieldId]
|
|
14
|
+
: undefined;
|
|
15
|
+
}
|
|
16
|
+
function applyRecordTypeFieldOptions(fields, semantics) {
|
|
17
|
+
if (!semantics)
|
|
18
|
+
return fields;
|
|
19
|
+
return fields.map(field => {
|
|
20
|
+
const allowed = recordTypeAllowedValues(field.id, semantics);
|
|
21
|
+
if (allowed === undefined)
|
|
22
|
+
return field;
|
|
23
|
+
const options = allowed.flatMap(value => {
|
|
24
|
+
const option = field.options?.find(item => item.value === value);
|
|
25
|
+
return option ? [option] : [];
|
|
26
|
+
});
|
|
27
|
+
return { ...field, options };
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/** Returns a stable diagnostic; config validation is owned by the backend. */
|
|
31
|
+
function recordTypeConfigurationError(fields, semantics) {
|
|
32
|
+
const subsets = semantics.picklistValues;
|
|
33
|
+
if (subsets !== undefined && subsets !== null) {
|
|
34
|
+
if (typeof subsets !== 'object' || Array.isArray(subsets))
|
|
35
|
+
return 'INVALID_SUBSET_MAP';
|
|
36
|
+
for (const [id, values] of Object.entries(subsets)) {
|
|
37
|
+
const field = fields.find(item => item.id === id);
|
|
38
|
+
if (!field || !['SELECT', 'MULTI_SELECT'].includes(field.type))
|
|
39
|
+
return 'INVALID_SUBSET_FIELD';
|
|
40
|
+
if (!Array.isArray(values) || values.some(value => typeof value !== 'string') ||
|
|
41
|
+
new Set(values).size !== values.length)
|
|
42
|
+
return 'INVALID_SUBSET_VALUES';
|
|
43
|
+
if (values.some(value => !field.options?.some(option => option.value === value)))
|
|
44
|
+
return 'UNKNOWN_SUBSET_VALUE';
|
|
45
|
+
if (semantics.businessProcess?.lifecycleFieldMetadataId === id)
|
|
46
|
+
return 'PROCESS_FIELD_SUBSET_CONFLICT';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const process = semantics.businessProcess;
|
|
50
|
+
if (process) {
|
|
51
|
+
const field = fields.find(item => item.id === process.lifecycleFieldMetadataId);
|
|
52
|
+
if (!field || field.type !== 'SELECT')
|
|
53
|
+
return 'INVALID_PROCESS_FIELD';
|
|
54
|
+
if (!Array.isArray(process.values) || process.values.length === 0 ||
|
|
55
|
+
process.values.some(value => typeof value !== 'string') ||
|
|
56
|
+
new Set(process.values).size !== process.values.length)
|
|
57
|
+
return 'INVALID_PROCESS_VALUES';
|
|
58
|
+
if (process.values.some(value => !field.options?.some(option => option.value === value)))
|
|
59
|
+
return 'UNKNOWN_PROCESS_VALUE';
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
function invalidRecordTypeFields(fields, semantics, data, existing) {
|
|
64
|
+
return fields.filter(field => {
|
|
65
|
+
const allowed = recordTypeAllowedValues(field.id, semantics);
|
|
66
|
+
if (allowed === undefined || !Object.prototype.hasOwnProperty.call(data, field.name))
|
|
67
|
+
return false;
|
|
68
|
+
const value = data[field.name];
|
|
69
|
+
if (value === undefined || value === null || value === '')
|
|
70
|
+
return false;
|
|
71
|
+
// Historical values survive an unchanged echo-back or unrelated partial edit.
|
|
72
|
+
if (existing && JSON.stringify(existing[field.name]) === JSON.stringify(value))
|
|
73
|
+
return false;
|
|
74
|
+
const values = Array.isArray(value) ? value : [value];
|
|
75
|
+
return values.some(item => typeof item !== 'string' || !allowed.includes(item));
|
|
76
|
+
}).map(field => field.name);
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=recordTypeSemantics.js.map
|
package/dist/nexus-cli/node_modules/@nexusclaw/shared/dist/record-home/recordTypeSemantics.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordTypeSemantics.js","sourceRoot":"","sources":["../../src/record-home/recordTypeSemantics.ts"],"names":[],"mappings":";;AAkBA,0DAWC;AAED,kEAcC;AAGD,oEA0BC;AAED,0DAgBC;AA1ED,SAAgB,uBAAuB,CACrC,OAAe,EACf,SAAsC;IAEtC,IAAI,SAAS,EAAE,eAAe,EAAE,wBAAwB,KAAK,OAAO,EAAE,CAAC;QACrE,OAAO,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC;IAC1C,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,EAAE,cAAc,CAAC;IAC1C,OAAO,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;QACtE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QAClB,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAgB,2BAA2B,CACzC,MAAW,EACX,SAAsC;IAEtC,IAAI,CAAC,SAAS;QAAE,OAAO,MAAM,CAAC;IAC9B,OAAO,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QACxB,MAAM,OAAO,GAAG,uBAAuB,CAAC,KAAK,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAC7D,IAAI,OAAO,KAAK,SAAS;YAAE,OAAO,KAAK,CAAC;QACxC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACtC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;YACjE,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,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CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QACnG,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;YAAE,OAAO,KAAK,CAAC;QACxE,8EAA8E;QAC9E,IAAI,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;QAC7F,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACtD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAClF,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface RecordTypeOptionSource {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
objectMetadataId?: string;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
isDefault: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface RecordTypeCreatePermission {
|
|
9
|
+
recordTypeId: string;
|
|
10
|
+
objectMetadataId: string;
|
|
11
|
+
canCreate: boolean;
|
|
12
|
+
isDefault: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const resolveCreateRecordTypeOptions: ({ objectMetadataId, recordTypes, permissions, }: {
|
|
15
|
+
objectMetadataId?: string;
|
|
16
|
+
recordTypes: RecordTypeOptionSource[];
|
|
17
|
+
permissions: RecordTypeCreatePermission[];
|
|
18
|
+
}) => {
|
|
19
|
+
options: Array<{
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}>;
|
|
23
|
+
defaultId?: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveCreateRecordTypeOptions = void 0;
|
|
4
|
+
const resolveCreateRecordTypeOptions = ({ objectMetadataId, recordTypes, permissions, }) => {
|
|
5
|
+
if (!objectMetadataId)
|
|
6
|
+
return { options: [] };
|
|
7
|
+
const options = recordTypes
|
|
8
|
+
.filter((recordType) => {
|
|
9
|
+
if (!recordType.isActive || recordType.objectMetadataId !== objectMetadataId)
|
|
10
|
+
return false;
|
|
11
|
+
const permission = permissions.find((entry) => entry.recordTypeId === recordType.id);
|
|
12
|
+
return permission?.canCreate ?? true;
|
|
13
|
+
})
|
|
14
|
+
.map(({ id, label }) => ({ id, label }));
|
|
15
|
+
const allowedIds = new Set(options.map(({ id }) => id));
|
|
16
|
+
const defaultId = permissions.find((permission) => permission.objectMetadataId === objectMetadataId &&
|
|
17
|
+
permission.isDefault &&
|
|
18
|
+
allowedIds.has(permission.recordTypeId))?.recordTypeId ??
|
|
19
|
+
recordTypes.find((recordType) => recordType.isDefault && allowedIds.has(recordType.id))?.id ??
|
|
20
|
+
options[0]?.id;
|
|
21
|
+
return { options, defaultId };
|
|
22
|
+
};
|
|
23
|
+
exports.resolveCreateRecordTypeOptions = resolveCreateRecordTypeOptions;
|
|
24
|
+
//# sourceMappingURL=recordTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordTypes.js","sourceRoot":"","sources":["../../src/record-home/recordTypes.ts"],"names":[],"mappings":";;;AAeO,MAAM,8BAA8B,GAAG,CAAC,EAC7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AAC;AA9BW,QAAA,8BAA8B,kCA8BzC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type RecordShareTargetType = 'USER' | 'PUBLIC_GROUP' | 'ROLE' | 'ROLE_AND_SUBORDINATES';
|
|
2
|
+
export type RecordShareAccess = 'READ_ONLY' | 'READ_WRITE';
|
|
3
|
+
export interface RecordShare {
|
|
4
|
+
id: string;
|
|
5
|
+
targetType: RecordShareTargetType;
|
|
6
|
+
targetId: string;
|
|
7
|
+
targetLabel?: string;
|
|
8
|
+
accessLevel: RecordShareAccess;
|
|
9
|
+
}
|
|
10
|
+
export declare const RECORD_SHARING_STATE = "\n query RecordSharingState($objectName: String!, $recordId: ID!) {\n recordSharingState(objectName: $objectName, recordId: $recordId) {\n canManage shares { id targetType targetId targetLabel accessLevel }\n }\n }\n";
|
|
11
|
+
export declare const RECORD_SHARING_TARGETS = "\n query RecordSharingTargets($objectName: String!, $recordId: ID!, $targetType: RecordShareTargetType!, $search: String!) {\n recordSharingTargets(objectName: $objectName, recordId: $recordId, targetType: $targetType, search: $search) { id label }\n }\n";
|
|
12
|
+
export declare const GRANT_RECORD_SHARE = "\n mutation GrantRecordShare($objectName: String!, $recordId: ID!, $targetType: RecordShareTargetType!, $targetId: ID!, $accessLevel: SharingAccessLevel!) {\n grantRecordShare(objectName: $objectName, recordId: $recordId, targetType: $targetType, targetId: $targetId, accessLevel: $accessLevel) { id }\n }\n";
|
|
13
|
+
export declare const REVOKE_RECORD_SHARE = "\n mutation RevokeRecordShare($objectName: String!, $recordId: ID!, $shareId: ID!) {\n revokeRecordShare(objectName: $objectName, recordId: $recordId, shareId: $shareId)\n }\n";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REVOKE_RECORD_SHARE = exports.GRANT_RECORD_SHARE = exports.RECORD_SHARING_TARGETS = exports.RECORD_SHARING_STATE = void 0;
|
|
4
|
+
exports.RECORD_SHARING_STATE = `
|
|
5
|
+
query RecordSharingState($objectName: String!, $recordId: ID!) {
|
|
6
|
+
recordSharingState(objectName: $objectName, recordId: $recordId) {
|
|
7
|
+
canManage shares { id targetType targetId targetLabel accessLevel }
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
exports.RECORD_SHARING_TARGETS = `
|
|
12
|
+
query RecordSharingTargets($objectName: String!, $recordId: ID!, $targetType: RecordShareTargetType!, $search: String!) {
|
|
13
|
+
recordSharingTargets(objectName: $objectName, recordId: $recordId, targetType: $targetType, search: $search) { id label }
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
exports.GRANT_RECORD_SHARE = `
|
|
17
|
+
mutation GrantRecordShare($objectName: String!, $recordId: ID!, $targetType: RecordShareTargetType!, $targetId: ID!, $accessLevel: SharingAccessLevel!) {
|
|
18
|
+
grantRecordShare(objectName: $objectName, recordId: $recordId, targetType: $targetType, targetId: $targetId, accessLevel: $accessLevel) { id }
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
exports.REVOKE_RECORD_SHARE = `
|
|
22
|
+
mutation RevokeRecordShare($objectName: String!, $recordId: ID!, $shareId: ID!) {
|
|
23
|
+
revokeRecordShare(objectName: $objectName, recordId: $recordId, shareId: $shareId)
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
//# sourceMappingURL=sharing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharing.js","sourceRoot":"","sources":["../../src/record-home/sharing.ts"],"names":[],"mappings":";;;AAGa,QAAA,oBAAoB,GAAG;;;;;;CAMnC,CAAC;AACW,QAAA,sBAAsB,GAAG;;;;CAIrC,CAAC;AACW,QAAA,kBAAkB,GAAG;;;;CAIjC,CAAC;AACW,QAAA,mBAAmB,GAAG;;;;CAIlC,CAAC"}
|