kintone-pretty-fields 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Cybozu, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,138 @@
1
+ # kintone-pretty-fields
2
+
3
+ Retrieve kintone form field([@kintone/rest-api-client](https://www.npmjs.com/package/@kintone/rest-api-client)) information in a pretty format.
4
+
5
+ - [Description](#description)
6
+ - [Installation](#installation)
7
+ - [Usage](#usage)
8
+ - [License](#license)
9
+
10
+ ## Description
11
+
12
+ Provides the field information needed to create a kintone plugin.
13
+
14
+ 1. Get both field and spacer.
15
+ Check[ Kintone Developer Program ](https://kintone.dev/en/docs/kintone/rest-api/apps/get-form-fields/#response-parameters)for property details.
16
+
17
+ 2. Obtain in layout order. (top left first, bottom right after)
18
+
19
+ 3. Determine the fields in a table.
20
+ Set the table field code to the table property.
21
+
22
+ ```js
23
+ {
24
+ type: 'SINGLE_LINE_TEXT',
25
+ code: '文字列__1行_',
26
+ label: '文字列 (1行)',
27
+ noLabel: false,
28
+ required: false,
29
+ minLength: '',
30
+ maxLength: '',
31
+ expression: '',
32
+ hideExpression: false,
33
+ unique: false,
34
+ defaultValue: '',
35
+ table: 'テーブル' // table field code
36
+ }
37
+ ```
38
+
39
+ 4. Determine the fields in a group.
40
+ Set the group field code to the group property.
41
+ ```js
42
+ {
43
+ type: 'SINGLE_LINE_TEXT',
44
+ code: '文字列__1行_',
45
+ label: '文字列 (1行)',
46
+ noLabel: false,
47
+ required: false,
48
+ minLength: '',
49
+ maxLength: '',
50
+ expression: '',
51
+ hideExpression: false,
52
+ unique: false,
53
+ defaultValue: '',
54
+ group: 'グループ' // group field code
55
+ }
56
+ ```
57
+
58
+ 5. Determine the destination field for copying lookups.
59
+ Set the true to the isLookupCopy property.(Requires lookup source app permissions)
60
+ ```js
61
+ {
62
+ type: 'SINGLE_LINE_TEXT',
63
+ code: '文字列__1行_',
64
+ label: '文字列 (1行)',
65
+ noLabel: false,
66
+ required: false,
67
+ minLength: '',
68
+ maxLength: '',
69
+ expression: '',
70
+ hideExpression: false,
71
+ unique: false,
72
+ defaultValue: '',
73
+ isLookupCopy: true // If true, lookup copy destination field
74
+ }
75
+ ```
76
+
77
+ 6. Sorts the values of the options.
78
+ ```js
79
+ {
80
+ type: 'CHECK_BOX',
81
+ code: 'チェックボックス',
82
+ label: 'チェックボックス',
83
+ noLabel: false,
84
+ required: false,
85
+ options: {
86
+ sample1: { label: 'sample1', index: '0' },
87
+ sample4: { label: 'sample4', index: '3' },
88
+ sample3: { label: 'sample3', index: '2' },
89
+ sample2: { label: 'sample2', index: '1' }
90
+ },
91
+ defaultValue: [],
92
+ align: 'HORIZONTAL',
93
+ sortedOptions: [ 'sample1', 'sample2', 'sample3', 'sample4' ] // sorted options
94
+ }
95
+ ```
96
+
97
+ ## Installation
98
+
99
+ ### 1. Install with `npm`
100
+
101
+ This library is distributed on `npm`.
102
+
103
+ ```shell
104
+ npm install kintone-pretty-fields
105
+ ```
106
+
107
+ You can then use `import` to import the library.
108
+
109
+ ```ts
110
+ // ES modules
111
+ import { kintonePrettyFields } from "kintone-pretty-fields";
112
+ ```
113
+
114
+ ## Usage
115
+
116
+ Here is a sample code that retrieves form fields of an app.
117
+
118
+ ```ts
119
+ import { KintoneRestAPIClient } from "@kintone/rest-api-client";
120
+ import { kintonePrettyFields } from "kintone-pretty-fields";
121
+
122
+ const client = new KintoneRestAPIClient();
123
+ const { fields, spacers } = await kintonePrettyFields.get({ client, app: 1, lang: "en", preview: false });
124
+ console.log({ fields, spacers });
125
+
126
+ for (const field of fields) {
127
+ if (kintonePrettyFields.isSingleLineText(field)) {
128
+ // do something
129
+ }
130
+ if (kintonePrettyFields.isDate(field)) {
131
+ // do something
132
+ }
133
+ }
134
+ ```
135
+
136
+ ## License
137
+
138
+ - [MIT](https://github.com/kintone/js-sdk/tree/master/LICENSE)
package/dist/index.js ADDED
@@ -0,0 +1,139 @@
1
+ var j = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, F = { exports: {} };
2
+ (function(t, a) {
3
+ (function(o, c) {
4
+ c(a);
5
+ })(j, function(o) {
6
+ const c = Object.freeze(Object.defineProperty({ __proto__: null, isCalc: (e) => e.type === "CALC", isCategory: (e) => e.type === "CATEGORY", isCheckBox: (e) => e.type === "CHECK_BOX", isCreatedTime: (e) => e.type === "CREATED_TIME", isCreator: (e) => e.type === "CREATOR", isDate: (e) => e.type === "DATE", isDatetime: (e) => e.type === "DATETIME", isDropDown: (e) => e.type === "DROP_DOWN", isFile: (e) => e.type === "FILE", isGroup: (e) => e.type === "GROUP", isGroupSelect: (e) => e.type === "GROUP_SELECT", isLink: (e) => e.type === "LINK", isLookup: (e) => (e.type === "SINGLE_LINE_TEXT" || e.type === "NUMBER") && "lookup" in e, isModifier: (e) => e.type === "MODIFIER", isMultiLineText: (e) => e.type === "MULTI_LINE_TEXT", isMultiSelect: (e) => e.type === "MULTI_SELECT", isNumber: (e) => e.type === "NUMBER", isOrganizationSelect: (e) => e.type === "ORGANIZATION_SELECT", isRadioButton: (e) => e.type === "RADIO_BUTTON", isRecordNumber: (e) => e.type === "RECORD_NUMBER", isReferenceTable: (e) => e.type === "REFERENCE_TABLE", isRichText: (e) => e.type === "RICH_TEXT", isSingleLineText: (e) => e.type === "SINGLE_LINE_TEXT", isStatus: (e) => e.type === "STATUS", isStatusAssignee: (e) => e.type === "STATUS_ASSIGNEE", isSubtable: (e) => e.type === "SUBTABLE", isTime: (e) => e.type === "TIME", isUpdatedTime: (e) => e.type === "UPDATED_TIME", isUserSelect: (e) => e.type === "USER_SELECT" }, Symbol.toStringTag, { value: "Module" })), E = Object.freeze(Object.defineProperty({ __proto__: null, isCalc: (e) => e.type === "CALC", isCheckBox: (e) => e.type === "CHECK_BOX", isCreatedTime: (e) => e.type === "CREATED_TIME", isCreator: (e) => e.type === "CREATOR", isDate: (e) => e.type === "DATE", isDatetime: (e) => e.type === "DATETIME", isDropDown: (e) => e.type === "DROP_DOWN", isFile: (e) => e.type === "FILE", isGroup: (e) => e.type === "GROUP", isGroupSelect: (e) => e.type === "GROUP_SELECT", isHr: (e) => e.type === "HR", isLabel: (e) => e.type === "LABEL", isLink: (e) => e.type === "LINK", isModifier: (e) => e.type === "MODIFIER", isMultiLineText: (e) => e.type === "MULTI_LINE_TEXT", isMultiSelect: (e) => e.type === "MULTI_SELECT", isNumber: (e) => e.type === "NUMBER", isOrganizationSelect: (e) => e.type === "ORGANIZATION_SELECT", isRadioButon: (e) => e.type === "RADIO_BUTTON", isRecordNumber: (e) => e.type === "RECORD_NUMBER", isReferenceTable: (e) => e.type === "REFERENCE_TABLE", isRichText: (e) => e.type === "RICH_TEXT", isRow: (e) => e.type === "ROW", isSingleLineText: (e) => e.type === "SINGLE_LINE_TEXT", isSpacer: (e) => e.type === "SPACER", isSubtable: (e) => e.type === "SUBTABLE", isTime: (e) => e.type === "TIME", isUpdatedTime: (e) => e.type === "UPDATED_TIME", isUserSelect: (e) => e.type === "USER_SELECT" }, Symbol.toStringTag, { value: "Module" })), T = Object.freeze(Object.defineProperty({ __proto__: null, isCalc: (e) => e.type === "CALC", isCategory: (e) => e.type === "CATEGORY", isCheckBox: (e) => e.type === "CHECK_BOX", isCreatedTime: (e) => e.type === "CREATED_TIME", isCreator: (e) => e.type === "CREATOR", isDate: (e) => e.type === "DATE", isDatetime: (e) => e.type === "DATETIME", isDropDown: (e) => e.type === "DROP_DOWN", isFile: (e) => e.type === "FILE", isGroupSelect: (e) => e.type === "GROUP_SELECT", isLink: (e) => e.type === "LINK", isModifier: (e) => e.type === "MODIFIER", isMultiLineText: (e) => e.type === "MULTI_LINE_TEXT", isMultiSelect: (e) => e.type === "MULTI_SELECT", isNumber: (e) => e.type === "NUMBER", isOrganizationSelect: (e) => e.type === "ORGANIZATION_SELECT", isRadioButton: (e) => e.type === "RADIO_BUTTON", isRecordNumber: (e) => e.type === "RECORD_NUMBER", isRichText: (e) => e.type === "RICH_TEXT", isSingleLineText: (e) => e.type === "SINGLE_LINE_TEXT", isStatus: (e) => e.type === "STATUS", isStatusAssignee: (e) => e.type === "STATUS_ASSIGNEE", isSubtable: (e) => e.type === "SUBTABLE", isTime: (e) => e.type === "TIME", isUpdatedTime: (e) => e.type === "UPDATED_TIME", isUserSelect: (e) => e.type === "USER_SELECT" }, Symbol.toStringTag, { value: "Module" }));
7
+ o.guardFormField = c, o.guardFormLayout = E, o.guardRecord = T, Object.defineProperty(o, Symbol.toStringTag, { value: "Module" });
8
+ });
9
+ })(F, F.exports);
10
+ var i = F.exports;
11
+ const X = (t) => t.type === "RECORD_NUMBER", v = (t) => t.type === "CREATOR", w = (t) => t.type === "CREATED_TIME", H = (t) => t.type === "MODIFIER", K = (t) => t.type === "UPDATED_TIME", f = (t) => t.type === "SINGLE_LINE_TEXT", O = (t) => t.type === "MULTI_LINE_TEXT", I = (t) => t.type === "RICH_TEXT", A = (t) => t.type === "NUMBER", z = (t) => t.type === "CALC", b = (t) => t.type === "CHECK_BOX", N = (t) => t.type === "RADIO_BUTTON", D = (t) => t.type === "MULTI_SELECT", M = (t) => t.type === "DROP_DOWN", U = (t) => t.type === "USER_SELECT", B = (t) => t.type === "ORGANIZATION_SELECT", G = (t) => t.type === "GROUP_SELECT", h = (t) => t.type === "DATE", x = (t) => t.type === "TIME", P = (t) => t.type === "DATETIME", k = (t) => t.type === "LINK", W = (t) => t.type === "FILE", Z = (t) => (t.type === "SINGLE_LINE_TEXT" || t.type === "NUMBER") && "lookup" in t, Y = (t) => t.type === "SUBTABLE", q = (t) => t.type === "GROUP", J = (t) => t.type === "REFERENCE_TABLE", Q = (t) => t.type === "CATEGORY", V = (t) => t.type === "STATUS", $ = (t) => t.type === "STATUS_ASSIGNEE", y = (t) => Object.values(t).sort((a, o) => Number(a.index) - Number(o.index)).map(({ label: a }) => a), ee = (t, a) => {
12
+ var C;
13
+ const o = [], c = [], E = Object.values(t).find(i.guardFormField.isStatus);
14
+ E && E.enabled && o.push(E);
15
+ const T = Object.values(t).find(i.guardFormField.isStatusAssignee);
16
+ T && T.enabled && o.push(T);
17
+ const e = Object.values(t).find(i.guardFormField.isCategory);
18
+ e && e.enabled && o.push(e);
19
+ for (const u of a)
20
+ if (i.guardFormLayout.isRow(u))
21
+ for (const r of u.fields) {
22
+ if (i.guardFormLayout.isLabel(r) || i.guardFormLayout.isHr(r))
23
+ continue;
24
+ if (i.guardFormLayout.isSpacer(r)) {
25
+ c.push(r);
26
+ continue;
27
+ }
28
+ const d = t[r.code];
29
+ if (!i.guardFormField.isSubtable(d) && !i.guardFormField.isGroup(d)) {
30
+ if (i.guardFormField.isCheckBox(d) || i.guardFormField.isDropDown(d) || i.guardFormField.isMultiSelect(d) || i.guardFormField.isRadioButton(d)) {
31
+ const s = y(d.options);
32
+ o.push({ ...d, sortedOptions: s });
33
+ continue;
34
+ }
35
+ o.push(d);
36
+ }
37
+ }
38
+ else if (i.guardFormLayout.isSubtable(u)) {
39
+ const r = u.code, d = t[r];
40
+ if (!i.guardFormField.isSubtable(d))
41
+ continue;
42
+ const s = {};
43
+ for (const { code: l } of u.fields) {
44
+ const p = d.fields[l];
45
+ if (i.guardFormField.isCheckBox(p) || i.guardFormField.isDropDown(p) || i.guardFormField.isMultiSelect(p) || i.guardFormField.isRadioButton(p)) {
46
+ const n = y(p.options);
47
+ s[p.code] = { ...p, table: r, sortedOptions: n }, o.push({ ...p, table: r, sortedOptions: n });
48
+ continue;
49
+ }
50
+ s[p.code] = { ...p, table: r }, o.push({ ...p, table: r });
51
+ }
52
+ o.push({ ...d, fields: s });
53
+ } else if (i.guardFormLayout.isGroup(u)) {
54
+ const r = u.code, d = t[r];
55
+ if (!i.guardFormField.isGroup(d))
56
+ continue;
57
+ const s = {};
58
+ for (const l of u.layout)
59
+ for (const p of l.fields) {
60
+ if (i.guardFormLayout.isLabel(p) || i.guardFormLayout.isHr(p))
61
+ continue;
62
+ if (i.guardFormLayout.isSpacer(p)) {
63
+ c.push(p);
64
+ continue;
65
+ }
66
+ const n = t[p.code];
67
+ if (!i.guardFormField.isCategory(n) && !i.guardFormField.isStatus(n) && !i.guardFormField.isStatusAssignee(n) && !i.guardFormField.isSubtable(n) && !i.guardFormField.isGroup(n)) {
68
+ if (i.guardFormField.isCheckBox(n) || i.guardFormField.isDropDown(n) || i.guardFormField.isMultiSelect(n) || i.guardFormField.isRadioButton(n)) {
69
+ const _ = y(n.options);
70
+ s[n.code] = { ...n, group: r, sortedOptions: _ }, o.push({ ...n, group: r, sortedOptions: _ });
71
+ continue;
72
+ }
73
+ s[n.code] = { ...n, group: r }, o.push({ ...n, group: r });
74
+ }
75
+ }
76
+ o.push({ ...d, fields: s });
77
+ }
78
+ for (const u of Object.values(o))
79
+ if (i.guardFormField.isLookup(u)) {
80
+ if (u.lookup === null)
81
+ continue;
82
+ for (const r of u.lookup.fieldMappings) {
83
+ const d = (C = o.filter(
84
+ (s) => f(s) || A(s) || O(s) || I(s) || k(s) || b(s) || N(s) || M(s) || D(s) || h(s) || x(s) || P(s) || U(s) || B(s) || G(s)
85
+ )) == null ? void 0 : C.find((s) => s.code === r.field);
86
+ d && (d.isLookupCopy = !0);
87
+ }
88
+ }
89
+ const S = Object.values(t).find(i.guardFormField.isRecordNumber);
90
+ S && (o.some(i.guardFormField.isRecordNumber) || o.push(S));
91
+ const m = Object.values(t).find(i.guardFormField.isCreator);
92
+ m && (o.some(i.guardFormField.isCreator) || o.push(m));
93
+ const R = Object.values(t).find(i.guardFormField.isCreatedTime);
94
+ R && (o.some(i.guardFormField.isCreatedTime) || o.push(R));
95
+ const L = Object.values(t).find(i.guardFormField.isModifier);
96
+ L && (o.some(i.guardFormField.isModifier) || o.push(L));
97
+ const g = Object.values(t).find(i.guardFormField.isUpdatedTime);
98
+ return g && (o.some(i.guardFormField.isUpdatedTime) || o.push(g)), { fields: o, spacers: c };
99
+ }, te = async ({ client: t, app: a, lang: o, preview: c }) => {
100
+ const [{ properties: E }, { layout: T }] = await Promise.all([
101
+ t.app.getFormFields({ app: a, lang: o, preview: c }),
102
+ t.app.getFormLayout({ app: a, preview: c })
103
+ ]);
104
+ return ee(E, T);
105
+ }, ie = {
106
+ get: te,
107
+ isRecordNumber: X,
108
+ isCreator: v,
109
+ isCreatedTime: w,
110
+ isModifier: H,
111
+ isUpdatedTime: K,
112
+ isSingleLineText: f,
113
+ isMultiLineText: O,
114
+ isRichText: I,
115
+ isNumber: A,
116
+ isCalc: z,
117
+ isCheckBox: b,
118
+ isRadioButton: N,
119
+ isMultiSelect: D,
120
+ isDropDown: M,
121
+ isUserSelect: U,
122
+ isOrganizationSelect: B,
123
+ isGroupSelect: G,
124
+ isDate: h,
125
+ isTime: x,
126
+ isDatetime: P,
127
+ isLink: k,
128
+ isFile: W,
129
+ isLookup: Z,
130
+ isSubtable: Y,
131
+ isGroup: q,
132
+ isReferenceTable: J,
133
+ isCategory: Q,
134
+ isStatus: V,
135
+ isStatusAssignee: $
136
+ };
137
+ export {
138
+ ie as kintonePrettyFields
139
+ };
@@ -0,0 +1 @@
1
+ (function(E,y){typeof exports=="object"&&typeof module<"u"?y(exports):typeof define=="function"&&define.amd?define(["exports"],y):(E=typeof globalThis<"u"?globalThis:E||self,y(E.KintonePrettyFields={}))})(this,function(E){"use strict";var y=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},F={exports:{}};(function(t,a){(function(o,c){c(a)})(y,function(o){const c=Object.freeze(Object.defineProperty({__proto__:null,isCalc:e=>e.type==="CALC",isCategory:e=>e.type==="CATEGORY",isCheckBox:e=>e.type==="CHECK_BOX",isCreatedTime:e=>e.type==="CREATED_TIME",isCreator:e=>e.type==="CREATOR",isDate:e=>e.type==="DATE",isDatetime:e=>e.type==="DATETIME",isDropDown:e=>e.type==="DROP_DOWN",isFile:e=>e.type==="FILE",isGroup:e=>e.type==="GROUP",isGroupSelect:e=>e.type==="GROUP_SELECT",isLink:e=>e.type==="LINK",isLookup:e=>(e.type==="SINGLE_LINE_TEXT"||e.type==="NUMBER")&&"lookup"in e,isModifier:e=>e.type==="MODIFIER",isMultiLineText:e=>e.type==="MULTI_LINE_TEXT",isMultiSelect:e=>e.type==="MULTI_SELECT",isNumber:e=>e.type==="NUMBER",isOrganizationSelect:e=>e.type==="ORGANIZATION_SELECT",isRadioButton:e=>e.type==="RADIO_BUTTON",isRecordNumber:e=>e.type==="RECORD_NUMBER",isReferenceTable:e=>e.type==="REFERENCE_TABLE",isRichText:e=>e.type==="RICH_TEXT",isSingleLineText:e=>e.type==="SINGLE_LINE_TEXT",isStatus:e=>e.type==="STATUS",isStatusAssignee:e=>e.type==="STATUS_ASSIGNEE",isSubtable:e=>e.type==="SUBTABLE",isTime:e=>e.type==="TIME",isUpdatedTime:e=>e.type==="UPDATED_TIME",isUserSelect:e=>e.type==="USER_SELECT"},Symbol.toStringTag,{value:"Module"})),l=Object.freeze(Object.defineProperty({__proto__:null,isCalc:e=>e.type==="CALC",isCheckBox:e=>e.type==="CHECK_BOX",isCreatedTime:e=>e.type==="CREATED_TIME",isCreator:e=>e.type==="CREATOR",isDate:e=>e.type==="DATE",isDatetime:e=>e.type==="DATETIME",isDropDown:e=>e.type==="DROP_DOWN",isFile:e=>e.type==="FILE",isGroup:e=>e.type==="GROUP",isGroupSelect:e=>e.type==="GROUP_SELECT",isHr:e=>e.type==="HR",isLabel:e=>e.type==="LABEL",isLink:e=>e.type==="LINK",isModifier:e=>e.type==="MODIFIER",isMultiLineText:e=>e.type==="MULTI_LINE_TEXT",isMultiSelect:e=>e.type==="MULTI_SELECT",isNumber:e=>e.type==="NUMBER",isOrganizationSelect:e=>e.type==="ORGANIZATION_SELECT",isRadioButon:e=>e.type==="RADIO_BUTTON",isRecordNumber:e=>e.type==="RECORD_NUMBER",isReferenceTable:e=>e.type==="REFERENCE_TABLE",isRichText:e=>e.type==="RICH_TEXT",isRow:e=>e.type==="ROW",isSingleLineText:e=>e.type==="SINGLE_LINE_TEXT",isSpacer:e=>e.type==="SPACER",isSubtable:e=>e.type==="SUBTABLE",isTime:e=>e.type==="TIME",isUpdatedTime:e=>e.type==="UPDATED_TIME",isUserSelect:e=>e.type==="USER_SELECT"},Symbol.toStringTag,{value:"Module"})),T=Object.freeze(Object.defineProperty({__proto__:null,isCalc:e=>e.type==="CALC",isCategory:e=>e.type==="CATEGORY",isCheckBox:e=>e.type==="CHECK_BOX",isCreatedTime:e=>e.type==="CREATED_TIME",isCreator:e=>e.type==="CREATOR",isDate:e=>e.type==="DATE",isDatetime:e=>e.type==="DATETIME",isDropDown:e=>e.type==="DROP_DOWN",isFile:e=>e.type==="FILE",isGroupSelect:e=>e.type==="GROUP_SELECT",isLink:e=>e.type==="LINK",isModifier:e=>e.type==="MODIFIER",isMultiLineText:e=>e.type==="MULTI_LINE_TEXT",isMultiSelect:e=>e.type==="MULTI_SELECT",isNumber:e=>e.type==="NUMBER",isOrganizationSelect:e=>e.type==="ORGANIZATION_SELECT",isRadioButton:e=>e.type==="RADIO_BUTTON",isRecordNumber:e=>e.type==="RECORD_NUMBER",isRichText:e=>e.type==="RICH_TEXT",isSingleLineText:e=>e.type==="SINGLE_LINE_TEXT",isStatus:e=>e.type==="STATUS",isStatusAssignee:e=>e.type==="STATUS_ASSIGNEE",isSubtable:e=>e.type==="SUBTABLE",isTime:e=>e.type==="TIME",isUpdatedTime:e=>e.type==="UPDATED_TIME",isUserSelect:e=>e.type==="USER_SELECT"},Symbol.toStringTag,{value:"Module"}));o.guardFormField=c,o.guardFormLayout=l,o.guardRecord=T,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})})})(F,F.exports);var i=F.exports;const v=t=>t.type==="RECORD_NUMBER",w=t=>t.type==="CREATOR",H=t=>t.type==="CREATED_TIME",K=t=>t.type==="MODIFIER",z=t=>t.type==="UPDATED_TIME",R=t=>t.type==="SINGLE_LINE_TEXT",f=t=>t.type==="MULTI_LINE_TEXT",L=t=>t.type==="RICH_TEXT",g=t=>t.type==="NUMBER",W=t=>t.type==="CALC",C=t=>t.type==="CHECK_BOX",_=t=>t.type==="RADIO_BUTTON",O=t=>t.type==="MULTI_SELECT",I=t=>t.type==="DROP_DOWN",b=t=>t.type==="USER_SELECT",A=t=>t.type==="ORGANIZATION_SELECT",N=t=>t.type==="GROUP_SELECT",D=t=>t.type==="DATE",M=t=>t.type==="TIME",U=t=>t.type==="DATETIME",B=t=>t.type==="LINK",Z=t=>t.type==="FILE",Y=t=>(t.type==="SINGLE_LINE_TEXT"||t.type==="NUMBER")&&"lookup"in t,q=t=>t.type==="SUBTABLE",J=t=>t.type==="GROUP",Q=t=>t.type==="REFERENCE_TABLE",V=t=>t.type==="CATEGORY",$=t=>t.type==="STATUS",ee=t=>t.type==="STATUS_ASSIGNEE",m=t=>Object.values(t).sort((a,o)=>Number(a.index)-Number(o.index)).map(({label:a})=>a),te=(t,a)=>{var j;const o=[],c=[],l=Object.values(t).find(i.guardFormField.isStatus);l&&l.enabled&&o.push(l);const T=Object.values(t).find(i.guardFormField.isStatusAssignee);T&&T.enabled&&o.push(T);const e=Object.values(t).find(i.guardFormField.isCategory);e&&e.enabled&&o.push(e);for(const u of a)if(i.guardFormLayout.isRow(u))for(const r of u.fields){if(i.guardFormLayout.isLabel(r)||i.guardFormLayout.isHr(r))continue;if(i.guardFormLayout.isSpacer(r)){c.push(r);continue}const n=t[r.code];if(!i.guardFormField.isSubtable(n)&&!i.guardFormField.isGroup(n)){if(i.guardFormField.isCheckBox(n)||i.guardFormField.isDropDown(n)||i.guardFormField.isMultiSelect(n)||i.guardFormField.isRadioButton(n)){const s=m(n.options);o.push({...n,sortedOptions:s});continue}o.push(n)}}else if(i.guardFormLayout.isSubtable(u)){const r=u.code,n=t[r];if(!i.guardFormField.isSubtable(n))continue;const s={};for(const{code:S}of u.fields){const p=n.fields[S];if(i.guardFormField.isCheckBox(p)||i.guardFormField.isDropDown(p)||i.guardFormField.isMultiSelect(p)||i.guardFormField.isRadioButton(p)){const d=m(p.options);s[p.code]={...p,table:r,sortedOptions:d},o.push({...p,table:r,sortedOptions:d});continue}s[p.code]={...p,table:r},o.push({...p,table:r})}o.push({...n,fields:s})}else if(i.guardFormLayout.isGroup(u)){const r=u.code,n=t[r];if(!i.guardFormField.isGroup(n))continue;const s={};for(const S of u.layout)for(const p of S.fields){if(i.guardFormLayout.isLabel(p)||i.guardFormLayout.isHr(p))continue;if(i.guardFormLayout.isSpacer(p)){c.push(p);continue}const d=t[p.code];if(!i.guardFormField.isCategory(d)&&!i.guardFormField.isStatus(d)&&!i.guardFormField.isStatusAssignee(d)&&!i.guardFormField.isSubtable(d)&&!i.guardFormField.isGroup(d)){if(i.guardFormField.isCheckBox(d)||i.guardFormField.isDropDown(d)||i.guardFormField.isMultiSelect(d)||i.guardFormField.isRadioButton(d)){const X=m(d.options);s[d.code]={...d,group:r,sortedOptions:X},o.push({...d,group:r,sortedOptions:X});continue}s[d.code]={...d,group:r},o.push({...d,group:r})}}o.push({...n,fields:s})}for(const u of Object.values(o))if(i.guardFormField.isLookup(u)){if(u.lookup===null)continue;for(const r of u.lookup.fieldMappings){const n=(j=o.filter(s=>R(s)||g(s)||f(s)||L(s)||B(s)||C(s)||_(s)||I(s)||O(s)||D(s)||M(s)||U(s)||b(s)||A(s)||N(s)))==null?void 0:j.find(s=>s.code===r.field);n&&(n.isLookupCopy=!0)}}const G=Object.values(t).find(i.guardFormField.isRecordNumber);G&&(o.some(i.guardFormField.isRecordNumber)||o.push(G));const h=Object.values(t).find(i.guardFormField.isCreator);h&&(o.some(i.guardFormField.isCreator)||o.push(h));const x=Object.values(t).find(i.guardFormField.isCreatedTime);x&&(o.some(i.guardFormField.isCreatedTime)||o.push(x));const P=Object.values(t).find(i.guardFormField.isModifier);P&&(o.some(i.guardFormField.isModifier)||o.push(P));const k=Object.values(t).find(i.guardFormField.isUpdatedTime);return k&&(o.some(i.guardFormField.isUpdatedTime)||o.push(k)),{fields:o,spacers:c}},ie={get:async({client:t,app:a,lang:o,preview:c})=>{const[{properties:l},{layout:T}]=await Promise.all([t.app.getFormFields({app:a,lang:o,preview:c}),t.app.getFormLayout({app:a,preview:c})]);return te(l,T)},isRecordNumber:v,isCreator:w,isCreatedTime:H,isModifier:K,isUpdatedTime:z,isSingleLineText:R,isMultiLineText:f,isRichText:L,isNumber:g,isCalc:W,isCheckBox:C,isRadioButton:_,isMultiSelect:O,isDropDown:I,isUserSelect:b,isOrganizationSelect:A,isGroupSelect:N,isDate:D,isTime:M,isDatetime:U,isLink:B,isFile:Z,isLookup:Y,isSubtable:q,isGroup:J,isReferenceTable:Q,isCategory:V,isStatus:$,isStatusAssignee:ee};E.kintonePrettyFields=ie,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,36 @@
1
+ import { PrettyRecordNumber, PrettyCreator, PrettyCreatedTime, PrettyModifier, PrettyUpdatedTime, PrettySingleLineText, PrettyMultiLineText, PrettyRichText, PrettyNumber, PrettyCalc, PrettyCheckBox, PrettyRadioButton, PrettyMultiSelect, PrettyDropdown, PrettyUserSelect, PrettyOrganizationSelect, PrettyGroupSelect, PrettyDate, PrettyTime, PrettyDateTime, PrettyLink, PrettyFile, PrettyLookup, PrettySubtable, PrettyGroup, PrettyReferenceTable, PrettyCategory, PrettyStatus, PrettyStatusAssignee, PrettyInSubtable, PrettyInGroup, PrettyOneOf } from "../types/type";
2
+ declare const isRecordNumber: (field: PrettyOneOf) => field is PrettyRecordNumber;
3
+ declare const isCreator: (field: PrettyOneOf) => field is PrettyCreator;
4
+ declare const isCreatedTime: (field: PrettyOneOf) => field is PrettyCreatedTime;
5
+ declare const isModifier: (field: PrettyOneOf) => field is PrettyModifier;
6
+ declare const isUpdatedTime: (field: PrettyOneOf) => field is PrettyUpdatedTime;
7
+ declare const isSingleLineText: (field: PrettyOneOf) => field is PrettySingleLineText;
8
+ declare const isMultiLineText: (field: PrettyOneOf) => field is PrettyMultiLineText;
9
+ declare const isRichText: (field: PrettyOneOf) => field is PrettyRichText;
10
+ declare const isNumber: (field: PrettyOneOf) => field is PrettyNumber;
11
+ declare const isCalc: (field: PrettyOneOf) => field is PrettyCalc;
12
+ declare const isCheckBox: (field: PrettyOneOf) => field is PrettyCheckBox;
13
+ declare const isRadioButton: (field: PrettyOneOf) => field is PrettyRadioButton;
14
+ declare const isMultiSelect: (field: PrettyOneOf) => field is PrettyMultiSelect;
15
+ declare const isDropDown: (field: PrettyOneOf) => field is PrettyDropdown;
16
+ declare const isUserSelect: (field: PrettyOneOf) => field is PrettyUserSelect;
17
+ declare const isOrganizationSelect: (field: PrettyOneOf) => field is PrettyOrganizationSelect;
18
+ declare const isGroupSelect: (field: PrettyOneOf) => field is PrettyGroupSelect;
19
+ declare const isDate: (field: PrettyOneOf) => field is PrettyDate;
20
+ declare const isTime: (field: PrettyOneOf) => field is PrettyTime;
21
+ declare const isDatetime: (field: PrettyOneOf) => field is PrettyDateTime;
22
+ declare const isLink: (field: PrettyOneOf) => field is PrettyLink;
23
+ declare const isFile: (field: PrettyOneOf) => field is PrettyFile;
24
+ declare const isLookup: (field: PrettyOneOf) => field is PrettyLookup;
25
+ declare const isSubtable: (field: PrettyOneOf) => field is PrettySubtable<{
26
+ [fieldCode: string]: PrettyInSubtable;
27
+ }>;
28
+ declare const isGroup: (field: PrettyOneOf) => field is PrettyGroup<{
29
+ [fieldCode: string]: PrettyInGroup;
30
+ }>;
31
+ declare const isReferenceTable: (field: PrettyOneOf) => field is PrettyReferenceTable;
32
+ declare const isCategory: (field: PrettyOneOf) => field is PrettyCategory;
33
+ declare const isStatus: (field: PrettyOneOf) => field is PrettyStatus;
34
+ declare const isStatusAssignee: (field: PrettyOneOf) => field is PrettyStatusAssignee;
35
+ export { isRecordNumber, isCreator, isCreatedTime, isModifier, isUpdatedTime, isSingleLineText, isMultiLineText, isRichText, isNumber, isCalc, isCheckBox, isRadioButton, isMultiSelect, isDropDown, isUserSelect, isOrganizationSelect, isGroupSelect, isDate, isTime, isDatetime, isLink, isFile, isLookup, isSubtable, isGroup, isReferenceTable, isCategory, isStatus, isStatusAssignee, };
36
+ //# sourceMappingURL=formField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formField.d.ts","sourceRoot":"","sources":["../../../src/functions/formField.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACZ,MAAM,eAAe,CAAC;AAEvB,QAAA,MAAM,cAAc,UAAW,WAAW,gCAAgE,CAAC;AAC3G,QAAA,MAAM,SAAS,UAAW,WAAW,2BAAqD,CAAC;AAC3F,QAAA,MAAM,aAAa,UAAW,WAAW,+BAA8D,CAAC;AACxG,QAAA,MAAM,UAAU,UAAW,WAAW,4BAAuD,CAAC;AAC9F,QAAA,MAAM,aAAa,UAAW,WAAW,+BAA8D,CAAC;AACxG,QAAA,MAAM,gBAAgB,UAAW,WAAW,kCAAqE,CAAC;AAClH,QAAA,MAAM,eAAe,UAAW,WAAW,iCAAmE,CAAC;AAC/G,QAAA,MAAM,UAAU,UAAW,WAAW,4BAAwD,CAAC;AAC/F,QAAA,MAAM,QAAQ,UAAW,WAAW,0BAAmD,CAAC;AACxF,QAAA,MAAM,MAAM,UAAW,WAAW,wBAA+C,CAAC;AAClF,QAAA,MAAM,UAAU,UAAW,WAAW,4BAAwD,CAAC;AAC/F,QAAA,MAAM,aAAa,UAAW,WAAW,+BAA8D,CAAC;AACxG,QAAA,MAAM,aAAa,UAAW,WAAW,+BAA8D,CAAC;AACxG,QAAA,MAAM,UAAU,UAAW,WAAW,4BAAwD,CAAC;AAC/F,QAAA,MAAM,YAAY,UAAW,WAAW,8BAA4D,CAAC;AACrG,QAAA,MAAM,oBAAoB,UAAW,WAAW,sCAA4E,CAAC;AAC7H,QAAA,MAAM,aAAa,UAAW,WAAW,+BAA8D,CAAC;AACxG,QAAA,MAAM,MAAM,UAAW,WAAW,wBAA+C,CAAC;AAClF,QAAA,MAAM,MAAM,UAAW,WAAW,wBAA+C,CAAC;AAClF,QAAA,MAAM,UAAU,UAAW,WAAW,4BAAuD,CAAC;AAC9F,QAAA,MAAM,MAAM,UAAW,WAAW,wBAA+C,CAAC;AAClF,QAAA,MAAM,MAAM,UAAW,WAAW,wBAA+C,CAAC;AAClF,QAAA,MAAM,QAAQ,UAAW,WAAW,0BACiD,CAAC;AACtF,QAAA,MAAM,UAAU,UAAW,WAAW;;EAAkG,CAAC;AACzI,QAAA,MAAM,OAAO,UAAW,WAAW;;EAAyF,CAAC;AAC7H,QAAA,MAAM,gBAAgB,UAAW,WAAW,kCAAoE,CAAC;AACjH,QAAA,MAAM,UAAU,UAAW,WAAW,4BAAuD,CAAC;AAC9F,QAAA,MAAM,QAAQ,UAAW,WAAW,0BAAmD,CAAC;AACxF,QAAA,MAAM,gBAAgB,UAAW,WAAW,kCAAoE,CAAC;AAEjH,OAAO,EACL,cAAc,EACd,SAAS,EACT,aAAa,EACb,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,QAAQ,EACR,MAAM,EACN,UAAU,EACV,aAAa,EACb,aAAa,EACb,UAAU,EACV,YAAY,EACZ,oBAAoB,EACpB,aAAa,EACb,MAAM,EACN,MAAM,EACN,UAAU,EACV,MAAM,EACN,MAAM,EACN,QAAQ,EACR,UAAU,EACV,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,gBAAgB,GACjB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { KintoneRestAPIClient } from "@kintone/rest-api-client";
2
+ import { AppID, Lang } from "@kintone/rest-api-client/lib/src/client/types";
3
+ import { Spacer } from "@kintone/rest-api-client/lib/src/KintoneFields/types/fieldLayout";
4
+ import { PrettyOneOf } from "../types/type";
5
+ declare const get: ({ client, app, lang, preview }: {
6
+ client: KintoneRestAPIClient;
7
+ app: AppID;
8
+ lang: Lang;
9
+ preview: boolean;
10
+ }) => Promise<{
11
+ fields: PrettyOneOf[];
12
+ spacers: Spacer[];
13
+ }>;
14
+ export { get };
15
+ //# sourceMappingURL=utility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../src/functions/utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAsB,MAAM,+CAA+C,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,MAAM,kEAAkE,CAAC;AAK1F,OAAO,EAYL,WAAW,EAOZ,MAAM,eAAe,CAAC;AAsNvB,QAAA,MAAM,GAAG;YAAoD,oBAAoB;SAAO,KAAK;UAAQ,IAAI;aAAW,OAAO;;;;EAO1H,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -0,0 +1,46 @@
1
+ declare const kintonePrettyFields: {
2
+ get: ({ client, app, lang, preview }: {
3
+ client: import("@kintone/rest-api-client").KintoneRestAPIClient;
4
+ app: import("@kintone/rest-api-client/lib/src/client/types").AppID;
5
+ lang: import("@kintone/rest-api-client/lib/src/client/types").Lang;
6
+ preview: boolean;
7
+ }) => Promise<{
8
+ fields: import("./types/type").PrettyOneOf[];
9
+ spacers: import("@kintone/rest-api-client/lib/src/KintoneFields/types/fieldLayout").Spacer[];
10
+ }>;
11
+ isRecordNumber: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyRecordNumber;
12
+ isCreator: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyCreator;
13
+ isCreatedTime: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyCreatedTime;
14
+ isModifier: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyModifier;
15
+ isUpdatedTime: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyUpdatedTime;
16
+ isSingleLineText: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettySingleLineText;
17
+ isMultiLineText: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyMultiLineText;
18
+ isRichText: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyRichText;
19
+ isNumber: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyNumber;
20
+ isCalc: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyCalc;
21
+ isCheckBox: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyCheckBox;
22
+ isRadioButton: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyRadioButton;
23
+ isMultiSelect: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyMultiSelect;
24
+ isDropDown: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyDropdown;
25
+ isUserSelect: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyUserSelect;
26
+ isOrganizationSelect: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyOrganizationSelect;
27
+ isGroupSelect: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyGroupSelect;
28
+ isDate: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyDate;
29
+ isTime: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyTime;
30
+ isDatetime: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyDateTime;
31
+ isLink: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyLink;
32
+ isFile: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyFile;
33
+ isLookup: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyLookup;
34
+ isSubtable: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettySubtable<{
35
+ [fieldCode: string]: import("./types/type").PrettyInSubtable;
36
+ }>;
37
+ isGroup: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyGroup<{
38
+ [fieldCode: string]: import("./types/type").PrettyInGroup;
39
+ }>;
40
+ isReferenceTable: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyReferenceTable;
41
+ isCategory: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyCategory;
42
+ isStatus: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyStatus;
43
+ isStatusAssignee: (field: import("./types/type").PrettyOneOf) => field is import("./types/type").PrettyStatusAssignee;
44
+ };
45
+ export { kintonePrettyFields };
46
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAiCA,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BxB,CAAC;AAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "kintone-pretty-fields",
3
+ "type": "module",
4
+ "files": [
5
+ "dist"
6
+ ],
7
+ "version": "0.1.0",
8
+ "description": "Retrieve kintone form field(@kintone/rest-api-client) information in a pretty format.",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/cy-takeuchi/kintone-pretty-fields.git"
12
+ },
13
+ "keywords": [
14
+ "kintone"
15
+ ],
16
+ "author": "cy-takeuchi <cy.takeuchi@gmail.com>",
17
+ "license": "MIT",
18
+ "bugs": {
19
+ "url": "https://github.com/cy-takeuchi/kintone-pretty-fields/issues"
20
+ },
21
+ "homepage": "https://github.com/cy-takeuchi/kintone-pretty-fields",
22
+ "main": "./dist/index.js",
23
+ "module": "./dist/index.js",
24
+ "types": "./dist/types/index.d.ts",
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/types/index.d.ts",
28
+ "node": {
29
+ "import": "./dist/index.js",
30
+ "require": "./dist/index.umd.cjs",
31
+ "default": "./dist/index.js"
32
+ },
33
+ "browser": "./dist/index.umd.cjs"
34
+ }
35
+ },
36
+ "scripts": {
37
+ "prebuild": "rimraf ./dist",
38
+ "build": "tsc && vite build",
39
+ "watch": "tsc && vite build --watch",
40
+ "prepare": "npm run build"
41
+ },
42
+ "dependencies": {
43
+ "@kintone/rest-api-client": "^5.0.3",
44
+ "kintone-typeguard": "^0.6.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/node": "^20.10.0",
48
+ "prettier": "^3.1.0",
49
+ "rimraf": "^5.0.5",
50
+ "typescript": "^5.3.2",
51
+ "vite": "^5.0.2"
52
+ }
53
+ }