kintone-pretty-fields 0.10.4 → 0.10.6

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.
@@ -1,2 +1,2 @@
1
- export type { RecordNumber, Creator, CreatedTime, Modifier, UpdatedTime, SingleLineText, MultiLineText, RichText, Number, Calc, CheckBox, RadioButton, MultiSelect, Dropdown, UserSelect, OrganizationSelect, GroupSelect, Date, Time, DateTime, Link, File, Lookup, Subtable, Group, ReferenceTable, Category, Status, StatusAssignee, Spacer, InSubtable, InGroup, OneOf, } from "../types/type";
1
+ export type { Calc, Category, CheckBox, CreatedTime, Creator, Date, DateTime, Dropdown, File, Group, GroupSelect, InGroup, InSubtable, Link, Lookup, Modifier, MultiLineText, MultiSelect, Number, OneOf, OrganizationSelect, RadioButton, RecordNumber, ReferenceTable, RichText, SingleLineText, Spacer, Status, StatusAssignee, Subtable, Time, UpdatedTime, UserSelect, } from "../types/type";
2
2
  //# sourceMappingURL=formField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formField.d.ts","sourceRoot":"","sources":["../../src/exportTypes/formField.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,YAAY,EACZ,OAAO,EACP,WAAW,EACX,QAAQ,EACR,WAAW,EACX,cAAc,EACd,aAAa,EACb,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,WAAW,EACX,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,cAAc,EACd,QAAQ,EACR,MAAM,EACN,cAAc,EACd,MAAM,EACN,UAAU,EACV,OAAO,EACP,KAAK,GACL,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"formField.d.ts","sourceRoot":"","sources":["../../src/exportTypes/formField.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,IAAI,EACJ,QA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AAC,KAAK,EAChE,OAAO,CAAC,KACN,KAAK,IAAI,CAAwB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/functions/utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAInE,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AACpD,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAY7B,QAAA,MAAM,cAAc,eACP;IACX,CAAC,SAAS,EAAE,MAAM,GAAG,wBAAwB,CAAC,KAAK,CAAC;CACpD,eACY,iBAAiB,CAAC,KAAK,EAAE;;;CAgOtC,CAAC;AAEF,QAAA,MAAM,GAAG,oCAKN;IACF,MAAM,EAAE,oBAAoB,CAAC;IAC7B,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;CACjB;;;EAQA,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../src/functions/utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAInE,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AACpD,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAY7B,QAAA,MAAM,cAAc,GACnB,YAAY;IACX,CAAC,SAAS,EAAE,MAAM,GAAG,wBAAwB,CAAC,KAAK,CAAC;CACpD,EACD,aAAa,iBAAiB,CAAC,KAAK,EAAE;;;CAgOtC,CAAC;AAEF,QAAA,MAAM,GAAG,GAAU,iCAKhB;IACF,MAAM,EAAE,oBAAoB,CAAC;IAC7B,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,OAAO,CAAC;CACjB;;;EAQA,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,iBAAiB,MAAM,yBAAyB,CAAC;AAIlE,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACxB;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;CAKH,CAAC;AACF,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,iBAAiB,MAAM,yBAAyB,CAAC;AAIlE,QAAA,MAAM,mBAAmB;qBAHQ,8BACjC;gBAE4B,8BAEH;oBAMV,8BAEC;iBAEsC,8BAAgC;oBAAqG,8BAAgC;uBAA+G,8BAAgC;sBAAsH,8BAAgC;iBAA8G,8BAAgC;eAAiG,8BAAgC;aAA0F,8BAAgC;iBAA0F,8BAAgC;oBAAsG,8BAAgC;oBAA4G,8BAAgC;iBAAyG,8BAAgC;mBAAqG,8BAAgC;2BAAiH,8BAAgC;oBAA2H,8BAAgC;aAAqG,8BAAgC;aAAsF,8BAAgC;iBAA0F,8BAAgC;aAA8F,8BAAgC;aAAsF,8BAAgC;iBAA0F,8BAAgC;;;cAAwJ,8BAAgC;;;uBAAwJ,8BAAgC;iBAAgH,8BAAgC;eAAgG,8BAAgC;uBAAoG,8BAAgC;eAA+G,8BAAgC;mBAA6X,8BAAgC;gBAA2jD,iCAAiC,EAAE,QAAU;mBAAsG,iCAAiC,EAAE,QAAU;sBAA4G,iCAAiC,EAAE,QAAU;IAXrvL;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;CAKH,CAAC;AACF,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,177 +1,188 @@
1
- const X = (t) => t.type === "RECORD_NUMBER", H = (t) => t.type === "CREATOR", z = (t) => t.type === "CREATED_TIME", K = (t) => t.type === "MODIFIER", W = (t) => t.type === "UPDATED_TIME", E = (t) => t.type === "SINGLE_LINE_TEXT", R = (t) => t.type === "MULTI_LINE_TEXT", m = (t) => t.type === "RICH_TEXT", l = (t) => t.type === "NUMBER", _ = (t) => t.type === "CALC", g = (t) => t.type === "CHECK_BOX", I = (t) => t.type === "RADIO_BUTTON", b = (t) => t.type === "MULTI_SELECT", O = (t) => t.type === "DROP_DOWN", A = (t) => t.type === "USER_SELECT", f = (t) => t.type === "ORGANIZATION_SELECT", D = (t) => t.type === "GROUP_SELECT", N = (t) => t.type === "DATE", M = (t) => t.type === "TIME", U = (t) => t.type === "DATETIME", L = (t) => t.type === "LINK", Z = (t) => t.type === "FILE", Y = (t) => t.type === "SUBTABLE", V = (t) => t.type === "GROUP", q = (t) => t.type === "REFERENCE_TABLE", J = (t) => t.type === "CATEGORY", Q = (t) => t.type === "STATUS", $ = (t) => t.type === "STATUS_ASSIGNEE", ee = (t) => !!(E(t) && "lookup" in t || l(t) && "lookup" in t || _(t) && "lookup" in t || L(t) && "lookup" in t || X(t) && "lookup" in t), te = (t) => !!(E(t) && "isLookupCopy" in t || R(t) && "isLookupCopy" in t || m(t) && "isLookupCopy" in t || l(t) && "isLookupCopy" in t || _(t) && "isLookupCopy" in t || g(t) && "isLookupCopy" in t || I(t) && "isLookupCopy" in t || b(t) && "isLookupCopy" in t || O(t) && "isLookupCopy" in t || A(t) && "isLookupCopy" in t || f(t) && "isLookupCopy" in t || D(t) && "isLookupCopy" in t || N(t) && "isLookupCopy" in t || M(t) && "isLookupCopy" in t || U(t) && "isLookupCopy" in t || L(t) && "isLookupCopy" in t), ie = (t) => "group" in t, oe = (t) => "table" in t, se = (t) => !("table" in t), re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1
+ const oe = (t) => t.type === "RECORD_NUMBER", ae = (t) => t.type === "CREATOR", ce = (t) => t.type === "CREATED_TIME", de = (t) => t.type === "MODIFIER", ye = (t) => t.type === "UPDATED_TIME", I = (t) => t.type === "SINGLE_LINE_TEXT", D = (t) => t.type === "MULTI_LINE_TEXT", N = (t) => t.type === "RICH_TEXT", O = (t) => t.type === "NUMBER", M = (t) => t.type === "CALC", U = (t) => t.type === "CHECK_BOX", B = (t) => t.type === "RADIO_BUTTON", k = (t) => t.type === "MULTI_SELECT", G = (t) => t.type === "DROP_DOWN", x = (t) => t.type === "USER_SELECT", h = (t) => t.type === "ORGANIZATION_SELECT", P = (t) => t.type === "GROUP_SELECT", v = (t) => t.type === "DATE", j = (t) => t.type === "TIME", X = (t) => t.type === "DATETIME", b = (t) => t.type === "LINK", Ee = (t) => t.type === "FILE", Te = (t) => t.type === "SUBTABLE", le = (t) => t.type === "GROUP", Fe = (t) => t.type === "REFERENCE_TABLE", Le = (t) => t.type === "CATEGORY", Se = (t) => t.type === "STATUS", me = (t) => t.type === "STATUS_ASSIGNEE", Ce = (t) => !!(I(t) && "lookup" in t || O(t) && "lookup" in t || M(t) && "lookup" in t || b(t) && "lookup" in t || oe(t) && "lookup" in t), _e = (t) => !!(I(t) && "isLookupCopy" in t || D(t) && "isLookupCopy" in t || N(t) && "isLookupCopy" in t || O(t) && "isLookupCopy" in t || M(t) && "isLookupCopy" in t || U(t) && "isLookupCopy" in t || B(t) && "isLookupCopy" in t || k(t) && "isLookupCopy" in t || G(t) && "isLookupCopy" in t || x(t) && "isLookupCopy" in t || h(t) && "isLookupCopy" in t || P(t) && "isLookupCopy" in t || v(t) && "isLookupCopy" in t || j(t) && "isLookupCopy" in t || X(t) && "isLookupCopy" in t || b(t) && "isLookupCopy" in t), Re = (t) => "group" in t, ge = (t) => "table" in t, Ie = (t) => !("table" in t), Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2
2
  __proto__: null,
3
- isCalc: _,
4
- isCategory: J,
5
- isCheckBox: g,
6
- isCreatedTime: z,
7
- isCreator: H,
8
- isDate: N,
9
- isDatetime: U,
10
- isDropDown: O,
11
- isFile: Z,
12
- isGroup: V,
13
- isGroupSelect: D,
14
- isInGroup: ie,
15
- isInSubtable: oe,
16
- isLink: L,
17
- isLookup: ee,
18
- isLookupCopy: te,
19
- isModifier: K,
20
- isMultiLineText: R,
21
- isMultiSelect: b,
22
- isNotInSubtable: se,
23
- isNumber: l,
24
- isOrganizationSelect: f,
25
- isRadioButton: I,
26
- isRecordNumber: X,
27
- isReferenceTable: q,
28
- isRichText: m,
29
- isSingleLineText: E,
30
- isStatus: Q,
31
- isStatusAssignee: $,
32
- isSubtable: Y,
33
- isTime: M,
34
- isUpdatedTime: W,
35
- isUserSelect: A
3
+ isCalc: M,
4
+ isCategory: Le,
5
+ isCheckBox: U,
6
+ isCreatedTime: ce,
7
+ isCreator: ae,
8
+ isDate: v,
9
+ isDatetime: X,
10
+ isDropDown: G,
11
+ isFile: Ee,
12
+ isGroup: le,
13
+ isGroupSelect: P,
14
+ isInGroup: Re,
15
+ isInSubtable: ge,
16
+ isLink: b,
17
+ isLookup: Ce,
18
+ isLookupCopy: _e,
19
+ isModifier: de,
20
+ isMultiLineText: D,
21
+ isMultiSelect: k,
22
+ isNotInSubtable: Ie,
23
+ isNumber: O,
24
+ isOrganizationSelect: h,
25
+ isRadioButton: B,
26
+ isRecordNumber: oe,
27
+ isReferenceTable: Fe,
28
+ isRichText: N,
29
+ isSingleLineText: I,
30
+ isStatus: Se,
31
+ isStatusAssignee: me,
32
+ isSubtable: Te,
33
+ isTime: j,
34
+ isUpdatedTime: ye,
35
+ isUserSelect: x
36
36
  }, Symbol.toStringTag, { value: "Module" }));
37
- var ue = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, F = { exports: {} };
38
- (function(t, c) {
39
- (function(o, d) {
40
- d(c);
41
- })(ue, function(o) {
42
- const d = 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" })), y = 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", isID: (e) => e.type === "__ID__", 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", isRevision: (e) => e.type === "__REVISION__", 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" }));
43
- o.guardFormField = d, o.guardFormLayout = y, o.guardRecord = T, Object.defineProperty(o, Symbol.toStringTag, { value: "Module" });
44
- });
45
- })(F, F.exports);
46
- var i = F.exports;
47
- const C = (t) => Object.values(t).sort((c, o) => Number(c.index) - Number(o.index)).map(({ label: c }) => c), w = (t, c) => {
48
- var P;
49
- const o = [], d = [], y = Object.values(t).find(
37
+ var g = { exports: {} }, be = g.exports, te;
38
+ function Ae() {
39
+ return te || (te = 1, (function(t, d) {
40
+ (function(o, y) {
41
+ y(d);
42
+ })(be, (function(o) {
43
+ const y = 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" })), T = 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" })), E = (e) => e.type === "RECORD_NUMBER", F = (e) => e.type === "CREATOR", L = (e) => e.type === "CREATED_TIME", S = (e) => e.type === "MODIFIER", m = (e) => e.type === "UPDATED_TIME", C = (e) => e.type === "SINGLE_LINE_TEXT", _ = (e) => e.type === "MULTI_LINE_TEXT", a = (e) => e.type === "RICH_TEXT", u = (e) => e.type === "NUMBER", n = (e) => e.type === "CALC", s = (e) => e.type === "CHECK_BOX", l = (e) => e.type === "RADIO_BUTTON", c = (e) => e.type === "MULTI_SELECT", p = (e) => e.type === "DROP_DOWN", R = (e) => e.type === "USER_SELECT", H = (e) => e.type === "ORGANIZATION_SELECT", w = (e) => e.type === "GROUP_SELECT", K = (e) => e.type === "DATE", z = (e) => e.type === "TIME", W = (e) => e.type === "DATETIME", Z = (e) => e.type === "LINK", re = (e) => e.type === "FILE", Y = (e) => e.type === "SUBTABLE", q = (e) => e.type === "CATEGORY", $ = (e) => e.type === "STATUS", V = (e) => e.type === "STATUS_ASSIGNEE", J = (e) => e.type === "__ID__", Q = (e) => e.type === "__REVISION__", ue = Object.freeze(Object.defineProperty({ __proto__: null, isCalc: n, isCategory: q, isCheckBox: s, isCreatedTime: L, isCreator: F, isDate: K, isDatetime: W, isDropDown: p, isFile: re, isGroupSelect: w, isID: J, isLink: Z, isModifier: S, isMultiLineText: _, isMultiSelect: c, isNumber: u, isOrganizationSelect: H, isRadioButton: l, isRecordNumber: E, isRevision: Q, isRichText: a, isSingleLineText: C, isStatus: $, isStatusAssignee: V, isSubtable: Y, isTime: z, isUpdatedTime: m, isUserSelect: R }, Symbol.toStringTag, { value: "Module" })), ne = Object.freeze(Object.defineProperty({ __proto__: null, converterGetToSet: (e) => {
44
+ const A = {};
45
+ for (const [ee, r] of Object.entries(e)) if (!(J(r) || Q(r) || E(r) || F(r) || L(r) || S(r) || m(r) || q(r) || $(r) || V(r))) {
46
+ if (r.type === "FILE") {
47
+ A[ee] = { type: "FILE", value: r.value.map((pe) => ({ fileKey: pe.fileKey })) };
48
+ continue;
49
+ }
50
+ (C(r) || u(r) || n(r) || _(r) || a(r) || Z(r) || s(r) || l(r) || p(r) || c(r) || K(r) || z(r) || W(r) || R(r) || H(r) || w(r) || Y(r)) && (A[ee] = r);
51
+ }
52
+ return A;
53
+ } }, Symbol.toStringTag, { value: "Module" }));
54
+ o.guardFormField = y, o.guardFormLayout = T, o.guardRecord = ue, o.guardUtils = ne, Object.defineProperty(o, Symbol.toStringTag, { value: "Module" });
55
+ }));
56
+ })(g, g.exports)), g.exports;
57
+ }
58
+ var i = Ae();
59
+ const f = (t) => Object.values(t).sort((d, o) => Number(d.index) - Number(o.index)).map(({ label: d }) => d), se = (t, d) => {
60
+ const o = [], y = [], T = Object.values(t).find(
50
61
  i.guardFormField.isStatus
51
62
  );
52
- y != null && y.enabled && o.push(y);
53
- const T = Object.values(t).find(
63
+ T?.enabled && o.push(T);
64
+ const E = Object.values(t).find(
54
65
  i.guardFormField.isStatusAssignee
55
66
  );
56
- T != null && T.enabled && o.push(T);
57
- const e = Object.values(t).find(
67
+ E?.enabled && o.push(E);
68
+ const F = Object.values(t).find(
58
69
  i.guardFormField.isCategory
59
70
  );
60
- e != null && e.enabled && o.push(e);
61
- for (const p of c)
62
- if (i.guardFormLayout.isRow(p))
63
- for (const r of p.fields) {
64
- if (i.guardFormLayout.isLabel(r) || i.guardFormLayout.isHr(r))
71
+ F?.enabled && o.push(F);
72
+ for (const a of d)
73
+ if (i.guardFormLayout.isRow(a))
74
+ for (const u of a.fields) {
75
+ if (i.guardFormLayout.isLabel(u) || i.guardFormLayout.isHr(u))
65
76
  continue;
66
- if (i.guardFormLayout.isSpacer(r)) {
67
- d.push(r);
77
+ if (i.guardFormLayout.isSpacer(u)) {
78
+ y.push(u);
68
79
  continue;
69
80
  }
70
- const u = t[r.code];
71
- if (!i.guardFormField.isSubtable(u) && !i.guardFormField.isGroup(u)) {
72
- if (i.guardFormField.isCheckBox(u) || i.guardFormField.isDropDown(u) || i.guardFormField.isMultiSelect(u) || i.guardFormField.isRadioButton(u)) {
73
- const s = C(u.options);
74
- o.push({ ...u, sortedOptions: s });
81
+ const n = t[u.code];
82
+ if (!i.guardFormField.isSubtable(n) && !i.guardFormField.isGroup(n)) {
83
+ if (i.guardFormField.isCheckBox(n) || i.guardFormField.isDropDown(n) || i.guardFormField.isMultiSelect(n) || i.guardFormField.isRadioButton(n)) {
84
+ const s = f(n.options);
85
+ o.push({ ...n, sortedOptions: s });
75
86
  continue;
76
87
  }
77
- o.push(u);
88
+ o.push(n);
78
89
  }
79
90
  }
80
- else if (i.guardFormLayout.isSubtable(p)) {
81
- const r = p.code, u = t[r];
82
- if (!i.guardFormField.isSubtable(u)) continue;
91
+ else if (i.guardFormLayout.isSubtable(a)) {
92
+ const u = a.code, n = t[u];
93
+ if (!i.guardFormField.isSubtable(n)) continue;
83
94
  const s = {};
84
- for (const { code: S } of p.fields) {
85
- const a = u.fields[S];
86
- if (i.guardFormField.isCheckBox(a) || i.guardFormField.isDropDown(a) || i.guardFormField.isMultiSelect(a) || i.guardFormField.isRadioButton(a)) {
87
- const n = C(a.options);
88
- s[a.code] = {
89
- ...a,
90
- table: r,
91
- sortedOptions: n
92
- }, o.push({ ...a, table: r, sortedOptions: n });
95
+ for (const { code: l } of a.fields) {
96
+ const c = n.fields[l];
97
+ if (i.guardFormField.isCheckBox(c) || i.guardFormField.isDropDown(c) || i.guardFormField.isMultiSelect(c) || i.guardFormField.isRadioButton(c)) {
98
+ const p = f(c.options);
99
+ s[c.code] = {
100
+ ...c,
101
+ table: u,
102
+ sortedOptions: p
103
+ }, o.push({ ...c, table: u, sortedOptions: p });
93
104
  continue;
94
105
  }
95
- s[a.code] = { ...a, table: r }, o.push({ ...a, table: r });
106
+ s[c.code] = { ...c, table: u }, o.push({ ...c, table: u });
96
107
  }
97
- o.push({ ...u, fields: s });
98
- } else if (i.guardFormLayout.isGroup(p)) {
99
- const r = p.code, u = t[r];
100
- if (!i.guardFormField.isGroup(u)) continue;
108
+ o.push({ ...n, fields: s });
109
+ } else if (i.guardFormLayout.isGroup(a)) {
110
+ const u = a.code, n = t[u];
111
+ if (!i.guardFormField.isGroup(n)) continue;
101
112
  const s = {};
102
- for (const S of p.layout)
103
- for (const a of S.fields) {
104
- if (i.guardFormLayout.isLabel(a) || i.guardFormLayout.isHr(a))
113
+ for (const l of a.layout)
114
+ for (const c of l.fields) {
115
+ if (i.guardFormLayout.isLabel(c) || i.guardFormLayout.isHr(c))
105
116
  continue;
106
- if (i.guardFormLayout.isSpacer(a)) {
107
- d.push({ ...a, group: r });
117
+ if (i.guardFormLayout.isSpacer(c)) {
118
+ y.push({ ...c, group: u });
108
119
  continue;
109
120
  }
110
- const n = t[a.code];
111
- if (!i.guardFormField.isCategory(n) && !i.guardFormField.isStatus(n) && !i.guardFormField.isStatusAssignee(n) && !i.guardFormField.isSubtable(n) && !i.guardFormField.isGroup(n)) {
112
- if (i.guardFormField.isCheckBox(n) || i.guardFormField.isDropDown(n) || i.guardFormField.isMultiSelect(n) || i.guardFormField.isRadioButton(n)) {
113
- const j = C(n.options);
114
- s[n.code] = {
115
- ...n,
116
- group: r,
117
- sortedOptions: j
118
- }, o.push({ ...n, group: r, sortedOptions: j });
121
+ const p = t[c.code];
122
+ if (!i.guardFormField.isCategory(p) && !i.guardFormField.isStatus(p) && !i.guardFormField.isStatusAssignee(p) && !i.guardFormField.isSubtable(p) && !i.guardFormField.isGroup(p)) {
123
+ if (i.guardFormField.isCheckBox(p) || i.guardFormField.isDropDown(p) || i.guardFormField.isMultiSelect(p) || i.guardFormField.isRadioButton(p)) {
124
+ const R = f(p.options);
125
+ s[p.code] = {
126
+ ...p,
127
+ group: u,
128
+ sortedOptions: R
129
+ }, o.push({ ...p, group: u, sortedOptions: R });
119
130
  continue;
120
131
  }
121
- s[n.code] = { ...n, group: r }, o.push({ ...n, group: r });
132
+ s[p.code] = { ...p, group: u }, o.push({ ...p, group: u });
122
133
  }
123
134
  }
124
- o.push({ ...u, fields: s });
135
+ o.push({ ...n, fields: s });
125
136
  }
126
- for (const p of Object.values(o))
127
- if (i.guardFormField.isLookup(p)) {
128
- if (p.lookup === null) continue;
129
- for (const r of p.lookup.fieldMappings) {
130
- const u = (P = o.filter(
131
- (s) => E(s) || l(s) || R(s) || m(s) || L(s) || g(s) || I(s) || O(s) || b(s) || N(s) || M(s) || U(s) || A(s) || f(s) || D(s)
132
- )) == null ? void 0 : P.find((s) => s.code === r.field);
133
- u && (u.isLookupCopy = !0);
137
+ for (const a of Object.values(o))
138
+ if (i.guardFormField.isLookup(a)) {
139
+ if (a.lookup === null) continue;
140
+ for (const u of a.lookup.fieldMappings) {
141
+ const n = o.filter(
142
+ (s) => I(s) || O(s) || D(s) || N(s) || b(s) || U(s) || B(s) || G(s) || k(s) || v(s) || j(s) || X(s) || x(s) || h(s) || P(s)
143
+ )?.find((s) => s.code === u.field);
144
+ n && (n.isLookupCopy = !0);
134
145
  }
135
146
  }
136
- const k = Object.values(t).find(
147
+ const L = Object.values(t).find(
137
148
  i.guardFormField.isRecordNumber
138
149
  );
139
- k && (o.some(i.guardFormField.isRecordNumber) || o.push(k));
140
- const B = Object.values(t).find(i.guardFormField.isCreator);
141
- B && (o.some(i.guardFormField.isCreator) || o.push(B));
142
- const G = Object.values(t).find(
150
+ L && (o.some(i.guardFormField.isRecordNumber) || o.push(L));
151
+ const S = Object.values(t).find(i.guardFormField.isCreator);
152
+ S && (o.some(i.guardFormField.isCreator) || o.push(S));
153
+ const m = Object.values(t).find(
143
154
  i.guardFormField.isCreatedTime
144
155
  );
145
- G && (o.some(i.guardFormField.isCreatedTime) || o.push(G));
146
- const h = Object.values(t).find(
156
+ m && (o.some(i.guardFormField.isCreatedTime) || o.push(m));
157
+ const C = Object.values(t).find(
147
158
  i.guardFormField.isModifier
148
159
  );
149
- h && (o.some(i.guardFormField.isModifier) || o.push(h));
150
- const x = Object.values(t).find(
160
+ C && (o.some(i.guardFormField.isModifier) || o.push(C));
161
+ const _ = Object.values(t).find(
151
162
  i.guardFormField.isUpdatedTime
152
163
  );
153
- return x && (o.some(i.guardFormField.isUpdatedTime) || o.push(x)), { fields: o, spacers: d };
154
- }, v = async ({
164
+ return _ && (o.some(i.guardFormField.isUpdatedTime) || o.push(_)), { fields: o, spacers: y };
165
+ }, ie = async ({
155
166
  client: t,
156
- app: c,
167
+ app: d,
157
168
  lang: o,
158
- preview: d
169
+ preview: y
159
170
  }) => {
160
- const [{ properties: y }, { layout: T }] = await Promise.all([
161
- t.app.getFormFields({ app: c, lang: o, preview: d }),
162
- t.app.getFormLayout({ app: c, preview: d })
171
+ const [{ properties: T }, { layout: E }] = await Promise.all([
172
+ t.app.getFormFields({ app: d, lang: o, preview: y }),
173
+ t.app.getFormLayout({ app: d, preview: y })
163
174
  ]);
164
- return w(y, T);
165
- }, ne = {
175
+ return se(T, E);
176
+ }, fe = {
166
177
  /**
167
178
  * kintone アプリのフィールドを取得します。
168
179
  * @deprecated getFields関数を利用してください。
169
180
  */
170
- get: v,
171
- getFields: v,
172
- generateFields: w,
173
- ...re
181
+ get: ie,
182
+ getFields: ie,
183
+ generateFields: se,
184
+ ...Oe
174
185
  };
175
186
  export {
176
- ne as kintonePrettyFields
187
+ fe as kintonePrettyFields
177
188
  };
@@ -1 +1 @@
1
- (function(E,l){typeof exports=="object"&&typeof module<"u"?l(exports):typeof define=="function"&&define.amd?define(["exports"],l):(E=typeof globalThis<"u"?globalThis:E||self,l(E.KintonePrettyFields={}))})(this,function(E){"use strict";const l=t=>t.type==="RECORD_NUMBER",K=t=>t.type==="CREATOR",z=t=>t.type==="CREATED_TIME",W=t=>t.type==="MODIFIER",Z=t=>t.type==="UPDATED_TIME",S=t=>t.type==="SINGLE_LINE_TEXT",C=t=>t.type==="MULTI_LINE_TEXT",m=t=>t.type==="RICH_TEXT",L=t=>t.type==="NUMBER",R=t=>t.type==="CALC",_=t=>t.type==="CHECK_BOX",g=t=>t.type==="RADIO_BUTTON",b=t=>t.type==="MULTI_SELECT",I=t=>t.type==="DROP_DOWN",f=t=>t.type==="USER_SELECT",O=t=>t.type==="ORGANIZATION_SELECT",A=t=>t.type==="GROUP_SELECT",N=t=>t.type==="DATE",D=t=>t.type==="TIME",M=t=>t.type==="DATETIME",F=t=>t.type==="LINK",Y=Object.freeze(Object.defineProperty({__proto__:null,isCalc:R,isCategory:t=>t.type==="CATEGORY",isCheckBox:_,isCreatedTime:z,isCreator:K,isDate:N,isDatetime:M,isDropDown:I,isFile:t=>t.type==="FILE",isGroup:t=>t.type==="GROUP",isGroupSelect:A,isInGroup:t=>"group"in t,isInSubtable:t=>"table"in t,isLink:F,isLookup:t=>!!(S(t)&&"lookup"in t||L(t)&&"lookup"in t||R(t)&&"lookup"in t||F(t)&&"lookup"in t||l(t)&&"lookup"in t),isLookupCopy:t=>!!(S(t)&&"isLookupCopy"in t||C(t)&&"isLookupCopy"in t||m(t)&&"isLookupCopy"in t||L(t)&&"isLookupCopy"in t||R(t)&&"isLookupCopy"in t||_(t)&&"isLookupCopy"in t||g(t)&&"isLookupCopy"in t||b(t)&&"isLookupCopy"in t||I(t)&&"isLookupCopy"in t||f(t)&&"isLookupCopy"in t||O(t)&&"isLookupCopy"in t||A(t)&&"isLookupCopy"in t||N(t)&&"isLookupCopy"in t||D(t)&&"isLookupCopy"in t||M(t)&&"isLookupCopy"in t||F(t)&&"isLookupCopy"in t),isModifier:W,isMultiLineText:C,isMultiSelect:b,isNotInSubtable:t=>!("table"in t),isNumber:L,isOrganizationSelect:O,isRadioButton:g,isRecordNumber:l,isReferenceTable:t=>t.type==="REFERENCE_TABLE",isRichText:m,isSingleLineText:S,isStatus:t=>t.type==="STATUS",isStatusAssignee:t=>t.type==="STATUS_ASSIGNEE",isSubtable:t=>t.type==="SUBTABLE",isTime:D,isUpdatedTime:Z,isUserSelect:f},Symbol.toStringTag,{value:"Module"}));var V=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},U={exports:{}};(function(t,d){(function(o,c){c(d)})(V,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"})),y=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",isID:e=>e.type==="__ID__",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",isRevision:e=>e.type==="__REVISION__",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=y,o.guardRecord=T,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})})})(U,U.exports);var i=U.exports;const k=t=>Object.values(t).sort((d,o)=>Number(d.index)-Number(o.index)).map(({label:d})=>d),G=(t,d)=>{var w;const o=[],c=[],y=Object.values(t).find(i.guardFormField.isStatus);y!=null&&y.enabled&&o.push(y);const T=Object.values(t).find(i.guardFormField.isStatusAssignee);T!=null&&T.enabled&&o.push(T);const e=Object.values(t).find(i.guardFormField.isCategory);e!=null&&e.enabled&&o.push(e);for(const p of d)if(i.guardFormLayout.isRow(p))for(const r of p.fields){if(i.guardFormLayout.isLabel(r)||i.guardFormLayout.isHr(r))continue;if(i.guardFormLayout.isSpacer(r)){c.push(r);continue}const u=t[r.code];if(!i.guardFormField.isSubtable(u)&&!i.guardFormField.isGroup(u)){if(i.guardFormField.isCheckBox(u)||i.guardFormField.isDropDown(u)||i.guardFormField.isMultiSelect(u)||i.guardFormField.isRadioButton(u)){const s=k(u.options);o.push({...u,sortedOptions:s});continue}o.push(u)}}else if(i.guardFormLayout.isSubtable(p)){const r=p.code,u=t[r];if(!i.guardFormField.isSubtable(u))continue;const s={};for(const{code:B}of p.fields){const a=u.fields[B];if(i.guardFormField.isCheckBox(a)||i.guardFormField.isDropDown(a)||i.guardFormField.isMultiSelect(a)||i.guardFormField.isRadioButton(a)){const n=k(a.options);s[a.code]={...a,table:r,sortedOptions:n},o.push({...a,table:r,sortedOptions:n});continue}s[a.code]={...a,table:r},o.push({...a,table:r})}o.push({...u,fields:s})}else if(i.guardFormLayout.isGroup(p)){const r=p.code,u=t[r];if(!i.guardFormField.isGroup(u))continue;const s={};for(const B of p.layout)for(const a of B.fields){if(i.guardFormLayout.isLabel(a)||i.guardFormLayout.isHr(a))continue;if(i.guardFormLayout.isSpacer(a)){c.push({...a,group:r});continue}const n=t[a.code];if(!i.guardFormField.isCategory(n)&&!i.guardFormField.isStatus(n)&&!i.guardFormField.isStatusAssignee(n)&&!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 H=k(n.options);s[n.code]={...n,group:r,sortedOptions:H},o.push({...n,group:r,sortedOptions:H});continue}s[n.code]={...n,group:r},o.push({...n,group:r})}}o.push({...u,fields:s})}for(const p of Object.values(o))if(i.guardFormField.isLookup(p)){if(p.lookup===null)continue;for(const r of p.lookup.fieldMappings){const u=(w=o.filter(s=>S(s)||L(s)||C(s)||m(s)||F(s)||_(s)||g(s)||I(s)||b(s)||N(s)||D(s)||M(s)||f(s)||O(s)||A(s)))==null?void 0:w.find(s=>s.code===r.field);u&&(u.isLookupCopy=!0)}}const x=Object.values(t).find(i.guardFormField.isRecordNumber);x&&(o.some(i.guardFormField.isRecordNumber)||o.push(x));const P=Object.values(t).find(i.guardFormField.isCreator);P&&(o.some(i.guardFormField.isCreator)||o.push(P));const j=Object.values(t).find(i.guardFormField.isCreatedTime);j&&(o.some(i.guardFormField.isCreatedTime)||o.push(j));const v=Object.values(t).find(i.guardFormField.isModifier);v&&(o.some(i.guardFormField.isModifier)||o.push(v));const X=Object.values(t).find(i.guardFormField.isUpdatedTime);return X&&(o.some(i.guardFormField.isUpdatedTime)||o.push(X)),{fields:o,spacers:c}},h=async({client:t,app:d,lang:o,preview:c})=>{const[{properties:y},{layout:T}]=await Promise.all([t.app.getFormFields({app:d,lang:o,preview:c}),t.app.getFormLayout({app:d,preview:c})]);return G(y,T)},q={get:h,getFields:h,generateFields:G,...Y};E.kintonePrettyFields=q,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
1
+ (function(E,l){typeof exports=="object"&&typeof module<"u"?l(exports):typeof define=="function"&&define.amd?define(["exports"],l):(E=typeof globalThis<"u"?globalThis:E||self,l(E.KintonePrettyFields={}))})(this,(function(E){"use strict";const l=t=>t.type==="RECORD_NUMBER",ue=t=>t.type==="CREATOR",ne=t=>t.type==="CREATED_TIME",pe=t=>t.type==="MODIFIER",ae=t=>t.type==="UPDATED_TIME",O=t=>t.type==="SINGLE_LINE_TEXT",N=t=>t.type==="MULTI_LINE_TEXT",D=t=>t.type==="RICH_TEXT",f=t=>t.type==="NUMBER",M=t=>t.type==="CALC",U=t=>t.type==="CHECK_BOX",k=t=>t.type==="RADIO_BUTTON",B=t=>t.type==="MULTI_SELECT",G=t=>t.type==="DROP_DOWN",x=t=>t.type==="USER_SELECT",h=t=>t.type==="ORGANIZATION_SELECT",P=t=>t.type==="GROUP_SELECT",j=t=>t.type==="DATE",v=t=>t.type==="TIME",X=t=>t.type==="DATETIME",A=t=>t.type==="LINK",de=Object.freeze(Object.defineProperty({__proto__:null,isCalc:M,isCategory:t=>t.type==="CATEGORY",isCheckBox:U,isCreatedTime:ne,isCreator:ue,isDate:j,isDatetime:X,isDropDown:G,isFile:t=>t.type==="FILE",isGroup:t=>t.type==="GROUP",isGroupSelect:P,isInGroup:t=>"group"in t,isInSubtable:t=>"table"in t,isLink:A,isLookup:t=>!!(O(t)&&"lookup"in t||f(t)&&"lookup"in t||M(t)&&"lookup"in t||A(t)&&"lookup"in t||l(t)&&"lookup"in t),isLookupCopy:t=>!!(O(t)&&"isLookupCopy"in t||N(t)&&"isLookupCopy"in t||D(t)&&"isLookupCopy"in t||f(t)&&"isLookupCopy"in t||M(t)&&"isLookupCopy"in t||U(t)&&"isLookupCopy"in t||k(t)&&"isLookupCopy"in t||B(t)&&"isLookupCopy"in t||G(t)&&"isLookupCopy"in t||x(t)&&"isLookupCopy"in t||h(t)&&"isLookupCopy"in t||P(t)&&"isLookupCopy"in t||j(t)&&"isLookupCopy"in t||v(t)&&"isLookupCopy"in t||X(t)&&"isLookupCopy"in t||A(t)&&"isLookupCopy"in t),isModifier:pe,isMultiLineText:N,isMultiSelect:B,isNotInSubtable:t=>!("table"in t),isNumber:f,isOrganizationSelect:h,isRadioButton:k,isRecordNumber:l,isReferenceTable:t=>t.type==="REFERENCE_TABLE",isRichText:D,isSingleLineText:O,isStatus:t=>t.type==="STATUS",isStatusAssignee:t=>t.type==="STATUS_ASSIGNEE",isSubtable:t=>t.type==="SUBTABLE",isTime:v,isUpdatedTime:ae,isUserSelect:x},Symbol.toStringTag,{value:"Module"}));var L={exports:{}},ce=L.exports,w;function ye(){return w||(w=1,(function(t,c){(function(o,y){y(c)})(ce,(function(o){const y=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"})),F=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=e=>e.type==="RECORD_NUMBER",m=e=>e.type==="CREATOR",C=e=>e.type==="CREATED_TIME",_=e=>e.type==="MODIFIER",R=e=>e.type==="UPDATED_TIME",g=e=>e.type==="SINGLE_LINE_TEXT",b=e=>e.type==="MULTI_LINE_TEXT",a=e=>e.type==="RICH_TEXT",u=e=>e.type==="NUMBER",n=e=>e.type==="CALC",s=e=>e.type==="CHECK_BOX",S=e=>e.type==="RADIO_BUTTON",d=e=>e.type==="MULTI_SELECT",p=e=>e.type==="DROP_DOWN",I=e=>e.type==="USER_SELECT",Z=e=>e.type==="ORGANIZATION_SELECT",Y=e=>e.type==="GROUP_SELECT",q=e=>e.type==="DATE",$=e=>e.type==="TIME",V=e=>e.type==="DATETIME",J=e=>e.type==="LINK",Ee=e=>e.type==="FILE",Q=e=>e.type==="SUBTABLE",ee=e=>e.type==="CATEGORY",te=e=>e.type==="STATUS",ie=e=>e.type==="STATUS_ASSIGNEE",oe=e=>e.type==="__ID__",se=e=>e.type==="__REVISION__",le=Object.freeze(Object.defineProperty({__proto__:null,isCalc:n,isCategory:ee,isCheckBox:s,isCreatedTime:C,isCreator:m,isDate:q,isDatetime:V,isDropDown:p,isFile:Ee,isGroupSelect:Y,isID:oe,isLink:J,isModifier:_,isMultiLineText:b,isMultiSelect:d,isNumber:u,isOrganizationSelect:Z,isRadioButton:S,isRecordNumber:T,isRevision:se,isRichText:a,isSingleLineText:g,isStatus:te,isStatusAssignee:ie,isSubtable:Q,isTime:$,isUpdatedTime:R,isUserSelect:I},Symbol.toStringTag,{value:"Module"})),Fe=Object.freeze(Object.defineProperty({__proto__:null,converterGetToSet:e=>{const K={};for(const[re,r]of Object.entries(e))if(!(oe(r)||se(r)||T(r)||m(r)||C(r)||_(r)||R(r)||ee(r)||te(r)||ie(r))){if(r.type==="FILE"){K[re]={type:"FILE",value:r.value.map(Se=>({fileKey:Se.fileKey}))};continue}(g(r)||u(r)||n(r)||b(r)||a(r)||J(r)||s(r)||S(r)||p(r)||d(r)||q(r)||$(r)||V(r)||I(r)||Z(r)||Y(r)||Q(r))&&(K[re]=r)}return K}},Symbol.toStringTag,{value:"Module"}));o.guardFormField=y,o.guardFormLayout=F,o.guardRecord=le,o.guardUtils=Fe,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})}))})(L,L.exports)),L.exports}var i=ye();const H=t=>Object.values(t).sort((c,o)=>Number(c.index)-Number(o.index)).map(({label:c})=>c),z=(t,c)=>{const o=[],y=[],F=Object.values(t).find(i.guardFormField.isStatus);F?.enabled&&o.push(F);const T=Object.values(t).find(i.guardFormField.isStatusAssignee);T?.enabled&&o.push(T);const m=Object.values(t).find(i.guardFormField.isCategory);m?.enabled&&o.push(m);for(const a of c)if(i.guardFormLayout.isRow(a))for(const u of a.fields){if(i.guardFormLayout.isLabel(u)||i.guardFormLayout.isHr(u))continue;if(i.guardFormLayout.isSpacer(u)){y.push(u);continue}const n=t[u.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=H(n.options);o.push({...n,sortedOptions:s});continue}o.push(n)}}else if(i.guardFormLayout.isSubtable(a)){const u=a.code,n=t[u];if(!i.guardFormField.isSubtable(n))continue;const s={};for(const{code:S}of a.fields){const d=n.fields[S];if(i.guardFormField.isCheckBox(d)||i.guardFormField.isDropDown(d)||i.guardFormField.isMultiSelect(d)||i.guardFormField.isRadioButton(d)){const p=H(d.options);s[d.code]={...d,table:u,sortedOptions:p},o.push({...d,table:u,sortedOptions:p});continue}s[d.code]={...d,table:u},o.push({...d,table:u})}o.push({...n,fields:s})}else if(i.guardFormLayout.isGroup(a)){const u=a.code,n=t[u];if(!i.guardFormField.isGroup(n))continue;const s={};for(const S of a.layout)for(const d of S.fields){if(i.guardFormLayout.isLabel(d)||i.guardFormLayout.isHr(d))continue;if(i.guardFormLayout.isSpacer(d)){y.push({...d,group:u});continue}const p=t[d.code];if(!i.guardFormField.isCategory(p)&&!i.guardFormField.isStatus(p)&&!i.guardFormField.isStatusAssignee(p)&&!i.guardFormField.isSubtable(p)&&!i.guardFormField.isGroup(p)){if(i.guardFormField.isCheckBox(p)||i.guardFormField.isDropDown(p)||i.guardFormField.isMultiSelect(p)||i.guardFormField.isRadioButton(p)){const I=H(p.options);s[p.code]={...p,group:u,sortedOptions:I},o.push({...p,group:u,sortedOptions:I});continue}s[p.code]={...p,group:u},o.push({...p,group:u})}}o.push({...n,fields:s})}for(const a of Object.values(o))if(i.guardFormField.isLookup(a)){if(a.lookup===null)continue;for(const u of a.lookup.fieldMappings){const n=o.filter(s=>O(s)||f(s)||N(s)||D(s)||A(s)||U(s)||k(s)||G(s)||B(s)||j(s)||v(s)||X(s)||x(s)||h(s)||P(s))?.find(s=>s.code===u.field);n&&(n.isLookupCopy=!0)}}const C=Object.values(t).find(i.guardFormField.isRecordNumber);C&&(o.some(i.guardFormField.isRecordNumber)||o.push(C));const _=Object.values(t).find(i.guardFormField.isCreator);_&&(o.some(i.guardFormField.isCreator)||o.push(_));const R=Object.values(t).find(i.guardFormField.isCreatedTime);R&&(o.some(i.guardFormField.isCreatedTime)||o.push(R));const g=Object.values(t).find(i.guardFormField.isModifier);g&&(o.some(i.guardFormField.isModifier)||o.push(g));const b=Object.values(t).find(i.guardFormField.isUpdatedTime);return b&&(o.some(i.guardFormField.isUpdatedTime)||o.push(b)),{fields:o,spacers:y}},W=async({client:t,app:c,lang:o,preview:y})=>{const[{properties:F},{layout:T}]=await Promise.all([t.app.getFormFields({app:c,lang:o,preview:y}),t.app.getFormLayout({app:c,preview:y})]);return z(F,T)},Te={get:W,getFields:W,generateFields:z,...de};E.kintonePrettyFields=Te,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "dist"
6
6
  ],
7
- "version": "0.10.4",
7
+ "version": "0.10.6",
8
8
  "description": "Get kintone form fields in a pretty format.",
9
9
  "repository": {
10
10
  "type": "git",
@@ -39,18 +39,18 @@
39
39
  "watch": "tsc && vite build --watch",
40
40
  "prepare": "npm run build",
41
41
  "test": "vitest",
42
- "check": "biome check --apply ./src ./tests"
42
+ "check": "biome check --write ./src ./tests"
43
43
  },
44
44
  "dependencies": {
45
- "@kintone/rest-api-client": "^5.5.2",
46
- "kintone-typeguard": "^0.15.2"
45
+ "@kintone/rest-api-client": "^6.0.0",
46
+ "kintone-typeguard": "^0.17.2"
47
47
  },
48
48
  "devDependencies": {
49
- "@biomejs/biome": "1.8.3",
50
- "@types/node": "^20.14.8",
51
- "rimraf": "^5.0.7",
52
- "typescript": "^5.5.2",
53
- "vite": "^5.3.1",
54
- "vitest": "^1.6.0"
49
+ "@biomejs/biome": "2.3.6",
50
+ "@types/node": "^24.10.1",
51
+ "rimraf": "^6.1.0",
52
+ "typescript": "^5.9.3",
53
+ "vite": "^7.2.2",
54
+ "vitest": "^4.0.10"
55
55
  }
56
56
  }