kintone-pretty-fields 0.1.0 → 0.3.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.
@@ -0,0 +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, InSubtable, InGroup, OneOf, } from "../types/type";
2
+ //# sourceMappingURL=formField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formField.d.ts","sourceRoot":"","sources":["../../src/exportTypes/formField.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,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,UAAU,EACV,OAAO,EACP,KAAK,GACN,MAAM,eAAe,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { kintonePrettyType } from "../index";
2
+ export declare const isRecordNumber: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.RecordNumber;
3
+ export declare const isCreator: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Creator;
4
+ export declare const isCreatedTime: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.CreatedTime;
5
+ export declare const isModifier: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Modifier;
6
+ export declare const isUpdatedTime: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.UpdatedTime;
7
+ export declare const isSingleLineText: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.SingleLineText;
8
+ export declare const isMultiLineText: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.MultiLineText;
9
+ export declare const isRichText: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.RichText;
10
+ export declare const isNumber: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Number;
11
+ export declare const isCalc: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Calc;
12
+ export declare const isCheckBox: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.CheckBox;
13
+ export declare const isRadioButton: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.RadioButton;
14
+ export declare const isMultiSelect: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.MultiSelect;
15
+ export declare const isDropDown: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Dropdown;
16
+ export declare const isUserSelect: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.UserSelect;
17
+ export declare const isOrganizationSelect: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.OrganizationSelect;
18
+ export declare const isGroupSelect: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.GroupSelect;
19
+ export declare const isDate: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Date;
20
+ export declare const isTime: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Time;
21
+ export declare const isDatetime: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.DateTime;
22
+ export declare const isLink: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Link;
23
+ export declare const isFile: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.File;
24
+ export declare const isLookup: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Lookup;
25
+ export declare const isSubtable: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Subtable<{
26
+ [fieldCode: string]: kintonePrettyType.InSubtable;
27
+ }>;
28
+ export declare const isGroup: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Group<{
29
+ [fieldCode: string]: kintonePrettyType.InGroup;
30
+ }>;
31
+ export declare const isReferenceTable: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.ReferenceTable;
32
+ export declare const isCategory: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Category;
33
+ export declare const isStatus: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Status;
34
+ export declare const isStatusAssignee: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.StatusAssignee;
35
+ //# 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,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,eAAO,MAAM,cAAc,UAAW,kBAAkB,KAAK,4CAA4E,CAAC;AAC1I,eAAO,MAAM,SAAS,UAAW,kBAAkB,KAAK,uCAAiE,CAAC;AAC1H,eAAO,MAAM,aAAa,UAAW,kBAAkB,KAAK,2CAA0E,CAAC;AACvI,eAAO,MAAM,UAAU,UAAW,kBAAkB,KAAK,wCAAmE,CAAC;AAC7H,eAAO,MAAM,aAAa,UAAW,kBAAkB,KAAK,2CAA0E,CAAC;AACvI,eAAO,MAAM,gBAAgB,UAAW,kBAAkB,KAAK,8CAC5B,CAAC;AACpC,eAAO,MAAM,eAAe,UAAW,kBAAkB,KAAK,6CAC5B,CAAC;AACnC,eAAO,MAAM,UAAU,UAAW,kBAAkB,KAAK,wCAAoE,CAAC;AAC9H,eAAO,MAAM,QAAQ,UAAW,kBAAkB,KAAK,sCAA+D,CAAC;AACvH,eAAO,MAAM,MAAM,UAAW,kBAAkB,KAAK,oCAA2D,CAAC;AACjH,eAAO,MAAM,UAAU,UAAW,kBAAkB,KAAK,wCAAoE,CAAC;AAC9H,eAAO,MAAM,aAAa,UAAW,kBAAkB,KAAK,2CAA0E,CAAC;AACvI,eAAO,MAAM,aAAa,UAAW,kBAAkB,KAAK,2CAA0E,CAAC;AACvI,eAAO,MAAM,UAAU,UAAW,kBAAkB,KAAK,wCAAoE,CAAC;AAC9H,eAAO,MAAM,YAAY,UAAW,kBAAkB,KAAK,0CAAwE,CAAC;AACpI,eAAO,MAAM,oBAAoB,UAAW,kBAAkB,KAAK,kDAC7B,CAAC;AACvC,eAAO,MAAM,aAAa,UAAW,kBAAkB,KAAK,2CAA0E,CAAC;AACvI,eAAO,MAAM,MAAM,UAAW,kBAAkB,KAAK,oCAA2D,CAAC;AACjH,eAAO,MAAM,MAAM,UAAW,kBAAkB,KAAK,oCAA2D,CAAC;AACjH,eAAO,MAAM,UAAU,UAAW,kBAAkB,KAAK,wCAAmE,CAAC;AAC7H,eAAO,MAAM,MAAM,UAAW,kBAAkB,KAAK,oCAA2D,CAAC;AACjH,eAAO,MAAM,MAAM,UAAW,kBAAkB,KAAK,oCAA2D,CAAC;AACjH,eAAO,MAAM,QAAQ,UAAW,kBAAkB,KAAK,sCAC8B,CAAC;AACtF,eAAO,MAAM,UAAU,UACd,kBAAkB,KAAK;;EAC0F,CAAC;AAC3H,eAAO,MAAM,OAAO,UACX,kBAAkB,KAAK;;EACiF,CAAC;AAClH,eAAO,MAAM,gBAAgB,UAAW,kBAAkB,KAAK,8CAC7B,CAAC;AACnC,eAAO,MAAM,UAAU,UAAW,kBAAkB,KAAK,wCAAmE,CAAC;AAC7H,eAAO,MAAM,QAAQ,UAAW,kBAAkB,KAAK,sCAA+D,CAAC;AACvH,eAAO,MAAM,gBAAgB,UAAW,kBAAkB,KAAK,8CAC7B,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { KintoneRestAPIClient } from "@kintone/rest-api-client";
2
2
  import { AppID, Lang } from "@kintone/rest-api-client/lib/src/client/types";
3
3
  import { Spacer } from "@kintone/rest-api-client/lib/src/KintoneFields/types/fieldLayout";
4
- import { PrettyOneOf } from "../types/type";
4
+ import { kintonePrettyType } from "../index";
5
5
  declare const get: ({ client, app, lang, preview }: {
6
6
  client: KintoneRestAPIClient;
7
7
  app: AppID;
8
8
  lang: Lang;
9
9
  preview: boolean;
10
10
  }) => Promise<{
11
- fields: PrettyOneOf[];
11
+ fields: kintonePrettyType.OneOf[];
12
12
  spacers: Spacer[];
13
13
  }>;
14
14
  export { get };
@@ -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;AAI1F,OAAO,EAAuB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAsNlE,QAAA,MAAM,GAAG;YAAoD,oBAAoB;SAAO,KAAK;UAAQ,IAAI;aAAW,OAAO;;;;EAO1H,CAAC;AAEF,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -0,0 +1,48 @@
1
+ import type * as kintonePrettyType from "./exportTypes/formField";
2
+ declare const kintonePrettyFields: {
3
+ isRecordNumber: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.RecordNumber;
4
+ isCreator: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Creator;
5
+ isCreatedTime: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.CreatedTime;
6
+ isModifier: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Modifier;
7
+ isUpdatedTime: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.UpdatedTime;
8
+ isSingleLineText: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.SingleLineText;
9
+ isMultiLineText: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.MultiLineText;
10
+ isRichText: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.RichText;
11
+ isNumber: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Number;
12
+ isCalc: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Calc;
13
+ isCheckBox: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.CheckBox;
14
+ isRadioButton: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.RadioButton;
15
+ isMultiSelect: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.MultiSelect;
16
+ isDropDown: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Dropdown;
17
+ isUserSelect: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.UserSelect;
18
+ isOrganizationSelect: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.OrganizationSelect;
19
+ isGroupSelect: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.GroupSelect;
20
+ isDate: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Date;
21
+ isTime: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Time;
22
+ isDatetime: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.DateTime;
23
+ isLink: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Link;
24
+ isFile: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.File;
25
+ isLookup: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Lookup;
26
+ isSubtable: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Subtable<{
27
+ [fieldCode: string]: kintonePrettyType.InSubtable;
28
+ }>;
29
+ isGroup: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Group<{
30
+ [fieldCode: string]: kintonePrettyType.InGroup;
31
+ }>;
32
+ isReferenceTable: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.ReferenceTable;
33
+ isCategory: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Category;
34
+ isStatus: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.Status;
35
+ isStatusAssignee: (field: kintonePrettyType.OneOf) => field is kintonePrettyType.StatusAssignee;
36
+ get: ({ client, app, lang, preview }: {
37
+ client: import("@kintone/rest-api-client").KintoneRestAPIClient;
38
+ app: import("@kintone/rest-api-client/lib/src/client/types").AppID;
39
+ lang: import("@kintone/rest-api-client/lib/src/client/types").Lang;
40
+ preview: boolean;
41
+ }) => Promise<{
42
+ fields: kintonePrettyType.OneOf[];
43
+ spacers: import("@kintone/rest-api-client/lib/src/KintoneFields/types/fieldLayout").Spacer[];
44
+ }>;
45
+ };
46
+ export { kintonePrettyFields };
47
+ export type { kintonePrettyType };
48
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,iBAAiB,MAAM,yBAAyB,CAAC;AAElE,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAqC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,139 +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" });
1
+ var O = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, S = { exports: {} };
2
+ (function(t, c) {
3
+ (function(o, l) {
4
+ l(c);
5
+ })(O, function(o) {
6
+ const l = 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 = 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 = l, o.guardFormLayout = T, o.guardRecord = E, Object.defineProperty(o, Symbol.toStringTag, { value: "Module" });
8
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) => {
9
+ })(S, S.exports);
10
+ var i = S.exports;
11
+ const F = (t) => Object.values(t).sort((c, o) => Number(c.index) - Number(o.index)).map(({ label: c }) => c), I = (t, c) => {
12
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);
13
+ const o = [], l = [], T = Object.values(t).find(i.guardFormField.isStatus);
16
14
  T && T.enabled && o.push(T);
15
+ const E = Object.values(t).find(i.guardFormField.isStatusAssignee);
16
+ E && E.enabled && o.push(E);
17
17
  const e = Object.values(t).find(i.guardFormField.isCategory);
18
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) {
19
+ for (const d of c)
20
+ if (i.guardFormLayout.isRow(d))
21
+ for (const r of d.fields) {
22
22
  if (i.guardFormLayout.isLabel(r) || i.guardFormLayout.isHr(r))
23
23
  continue;
24
24
  if (i.guardFormLayout.isSpacer(r)) {
25
- c.push(r);
25
+ l.push(r);
26
26
  continue;
27
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 });
28
+ const n = t[r.code];
29
+ if (!i.guardFormField.isSubtable(n) && !i.guardFormField.isGroup(n)) {
30
+ if (i.guardFormField.isCheckBox(n) || i.guardFormField.isDropDown(n) || i.guardFormField.isMultiSelect(n) || i.guardFormField.isRadioButton(n)) {
31
+ const s = F(n.options);
32
+ o.push({ ...n, sortedOptions: s });
33
33
  continue;
34
34
  }
35
- o.push(d);
35
+ o.push(n);
36
36
  }
37
37
  }
38
- else if (i.guardFormLayout.isSubtable(u)) {
39
- const r = u.code, d = t[r];
40
- if (!i.guardFormField.isSubtable(d))
38
+ else if (i.guardFormLayout.isSubtable(d)) {
39
+ const r = d.code, n = t[r];
40
+ if (!i.guardFormField.isSubtable(n))
41
41
  continue;
42
42
  const s = {};
43
- for (const { code: l } of u.fields) {
44
- const p = d.fields[l];
43
+ for (const { code: y } of d.fields) {
44
+ const p = n.fields[y];
45
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 });
46
+ const u = F(p.options);
47
+ s[p.code] = { ...p, table: r, sortedOptions: u }, o.push({ ...p, table: r, sortedOptions: u });
48
48
  continue;
49
49
  }
50
50
  s[p.code] = { ...p, table: r }, o.push({ ...p, table: r });
51
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))
52
+ o.push({ ...n, fields: s });
53
+ } else if (i.guardFormLayout.isGroup(d)) {
54
+ const r = d.code, n = t[r];
55
+ if (!i.guardFormField.isGroup(n))
56
56
  continue;
57
57
  const s = {};
58
- for (const l of u.layout)
59
- for (const p of l.fields) {
58
+ for (const y of d.layout)
59
+ for (const p of y.fields) {
60
60
  if (i.guardFormLayout.isLabel(p) || i.guardFormLayout.isHr(p))
61
61
  continue;
62
62
  if (i.guardFormLayout.isSpacer(p)) {
63
- c.push(p);
63
+ l.push(p);
64
64
  continue;
65
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: _ });
66
+ const u = t[p.code];
67
+ if (!i.guardFormField.isCategory(u) && !i.guardFormField.isStatus(u) && !i.guardFormField.isStatusAssignee(u) && !i.guardFormField.isSubtable(u) && !i.guardFormField.isGroup(u)) {
68
+ if (i.guardFormField.isCheckBox(u) || i.guardFormField.isDropDown(u) || i.guardFormField.isMultiSelect(u) || i.guardFormField.isRadioButton(u)) {
69
+ const f = F(u.options);
70
+ s[u.code] = { ...u, group: r, sortedOptions: f }, o.push({ ...u, group: r, sortedOptions: f });
71
71
  continue;
72
72
  }
73
- s[n.code] = { ...n, group: r }, o.push({ ...n, group: r });
73
+ s[u.code] = { ...u, group: r }, o.push({ ...u, group: r });
74
74
  }
75
75
  }
76
- o.push({ ...d, fields: s });
76
+ o.push({ ...n, fields: s });
77
77
  }
78
- for (const u of Object.values(o))
79
- if (i.guardFormField.isLookup(u)) {
80
- if (u.lookup === null)
78
+ for (const d of Object.values(o))
79
+ if (i.guardFormField.isLookup(d)) {
80
+ if (d.lookup === null)
81
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)
82
+ for (const r of d.lookup.fieldMappings) {
83
+ const n = (C = o.filter(
84
+ (s) => a.isSingleLineText(s) || a.isNumber(s) || a.isMultiLineText(s) || a.isRichText(s) || a.isLink(s) || a.isCheckBox(s) || a.isRadioButton(s) || a.isDropDown(s) || a.isMultiSelect(s) || a.isDate(s) || a.isTime(s) || a.isDatetime(s) || a.isUserSelect(s) || a.isOrganizationSelect(s) || a.isGroupSelect(s)
85
85
  )) == null ? void 0 : C.find((s) => s.code === r.field);
86
- d && (d.isLookupCopy = !0);
86
+ n && (n.isLookupCopy = !0);
87
87
  }
88
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 })
89
+ const m = Object.values(t).find(i.guardFormField.isRecordNumber);
90
+ m && (o.some(i.guardFormField.isRecordNumber) || o.push(m));
91
+ const R = Object.values(t).find(i.guardFormField.isCreator);
92
+ R && (o.some(i.guardFormField.isCreator) || o.push(R));
93
+ const L = Object.values(t).find(i.guardFormField.isCreatedTime);
94
+ L && (o.some(i.guardFormField.isCreatedTime) || o.push(L));
95
+ const g = Object.values(t).find(i.guardFormField.isModifier);
96
+ g && (o.some(i.guardFormField.isModifier) || o.push(g));
97
+ const _ = Object.values(t).find(i.guardFormField.isUpdatedTime);
98
+ return _ && (o.some(i.guardFormField.isUpdatedTime) || o.push(_)), { fields: o, spacers: l };
99
+ }, b = async ({ client: t, app: c, lang: o, preview: l }) => {
100
+ const [{ properties: T }, { layout: E }] = await Promise.all([
101
+ t.app.getFormFields({ app: c, lang: o, preview: l }),
102
+ t.app.getFormLayout({ app: c, preview: l })
103
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
- };
104
+ return I(T, E);
105
+ }, A = (t) => t.type === "RECORD_NUMBER", D = (t) => t.type === "CREATOR", N = (t) => t.type === "CREATED_TIME", M = (t) => t.type === "MODIFIER", U = (t) => t.type === "UPDATED_TIME", B = (t) => t.type === "SINGLE_LINE_TEXT", G = (t) => t.type === "MULTI_LINE_TEXT", h = (t) => t.type === "RICH_TEXT", x = (t) => t.type === "NUMBER", k = (t) => t.type === "CALC", P = (t) => t.type === "CHECK_BOX", j = (t) => t.type === "RADIO_BUTTON", X = (t) => t.type === "MULTI_SELECT", v = (t) => t.type === "DROP_DOWN", w = (t) => t.type === "USER_SELECT", H = (t) => t.type === "ORGANIZATION_SELECT", z = (t) => t.type === "GROUP_SELECT", K = (t) => t.type === "DATE", W = (t) => t.type === "TIME", Z = (t) => t.type === "DATETIME", Y = (t) => t.type === "LINK", q = (t) => t.type === "FILE", J = (t) => (t.type === "SINGLE_LINE_TEXT" || t.type === "NUMBER") && "lookup" in t, Q = (t) => t.type === "SUBTABLE", V = (t) => t.type === "GROUP", $ = (t) => t.type === "REFERENCE_TABLE", ee = (t) => t.type === "CATEGORY", te = (t) => t.type === "STATUS", ie = (t) => t.type === "STATUS_ASSIGNEE", oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
106
+ __proto__: null,
107
+ isCalc: k,
108
+ isCategory: ee,
109
+ isCheckBox: P,
110
+ isCreatedTime: N,
111
+ isCreator: D,
112
+ isDate: K,
113
+ isDatetime: Z,
114
+ isDropDown: v,
115
+ isFile: q,
116
+ isGroup: V,
117
+ isGroupSelect: z,
118
+ isLink: Y,
119
+ isLookup: J,
120
+ isModifier: M,
121
+ isMultiLineText: G,
122
+ isMultiSelect: X,
123
+ isNumber: x,
124
+ isOrganizationSelect: H,
125
+ isRadioButton: j,
126
+ isRecordNumber: A,
127
+ isReferenceTable: $,
128
+ isRichText: h,
129
+ isSingleLineText: B,
130
+ isStatus: te,
131
+ isStatusAssignee: ie,
132
+ isSubtable: Q,
133
+ isTime: W,
134
+ isUpdatedTime: U,
135
+ isUserSelect: w
136
+ }, Symbol.toStringTag, { value: "Module" })), a = { get: b, ...oe };
137
137
  export {
138
- ie as kintonePrettyFields
138
+ a as kintonePrettyFields
139
139
  };
@@ -1 +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"})});
1
+ (function(E,S){typeof exports=="object"&&typeof module<"u"?S(exports):typeof define=="function"&&define.amd?define(["exports"],S):(E=typeof globalThis<"u"?globalThis:E||self,S(E.KintonePrettyFields={}))})(this,function(E){"use strict";var S=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},F={exports:{}};(function(i,c){(function(s,l){l(c)})(S,function(s){const l=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"})),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",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"}));s.guardFormField=l,s.guardFormLayout=T,s.guardRecord=y,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})})})(F,F.exports);var t=F.exports;const m=i=>Object.values(i).sort((c,s)=>Number(c.index)-Number(s.index)).map(({label:c})=>c),I=(i,c)=>{var b;const s=[],l=[],T=Object.values(i).find(t.guardFormField.isStatus);T&&T.enabled&&s.push(T);const y=Object.values(i).find(t.guardFormField.isStatusAssignee);y&&y.enabled&&s.push(y);const e=Object.values(i).find(t.guardFormField.isCategory);e&&e.enabled&&s.push(e);for(const d of c)if(t.guardFormLayout.isRow(d))for(const r of d.fields){if(t.guardFormLayout.isLabel(r)||t.guardFormLayout.isHr(r))continue;if(t.guardFormLayout.isSpacer(r)){l.push(r);continue}const n=i[r.code];if(!t.guardFormField.isSubtable(n)&&!t.guardFormField.isGroup(n)){if(t.guardFormField.isCheckBox(n)||t.guardFormField.isDropDown(n)||t.guardFormField.isMultiSelect(n)||t.guardFormField.isRadioButton(n)){const o=m(n.options);s.push({...n,sortedOptions:o});continue}s.push(n)}}else if(t.guardFormLayout.isSubtable(d)){const r=d.code,n=i[r];if(!t.guardFormField.isSubtable(n))continue;const o={};for(const{code:R}of d.fields){const p=n.fields[R];if(t.guardFormField.isCheckBox(p)||t.guardFormField.isDropDown(p)||t.guardFormField.isMultiSelect(p)||t.guardFormField.isRadioButton(p)){const u=m(p.options);o[p.code]={...p,table:r,sortedOptions:u},s.push({...p,table:r,sortedOptions:u});continue}o[p.code]={...p,table:r},s.push({...p,table:r})}s.push({...n,fields:o})}else if(t.guardFormLayout.isGroup(d)){const r=d.code,n=i[r];if(!t.guardFormField.isGroup(n))continue;const o={};for(const R of d.layout)for(const p of R.fields){if(t.guardFormLayout.isLabel(p)||t.guardFormLayout.isHr(p))continue;if(t.guardFormLayout.isSpacer(p)){l.push(p);continue}const u=i[p.code];if(!t.guardFormField.isCategory(u)&&!t.guardFormField.isStatus(u)&&!t.guardFormField.isStatusAssignee(u)&&!t.guardFormField.isSubtable(u)&&!t.guardFormField.isGroup(u)){if(t.guardFormField.isCheckBox(u)||t.guardFormField.isDropDown(u)||t.guardFormField.isMultiSelect(u)||t.guardFormField.isRadioButton(u)){const O=m(u.options);o[u.code]={...u,group:r,sortedOptions:O},s.push({...u,group:r,sortedOptions:O});continue}o[u.code]={...u,group:r},s.push({...u,group:r})}}s.push({...n,fields:o})}for(const d of Object.values(s))if(t.guardFormField.isLookup(d)){if(d.lookup===null)continue;for(const r of d.lookup.fieldMappings){const n=(b=s.filter(o=>a.isSingleLineText(o)||a.isNumber(o)||a.isMultiLineText(o)||a.isRichText(o)||a.isLink(o)||a.isCheckBox(o)||a.isRadioButton(o)||a.isDropDown(o)||a.isMultiSelect(o)||a.isDate(o)||a.isTime(o)||a.isDatetime(o)||a.isUserSelect(o)||a.isOrganizationSelect(o)||a.isGroupSelect(o)))==null?void 0:b.find(o=>o.code===r.field);n&&(n.isLookupCopy=!0)}}const L=Object.values(i).find(t.guardFormField.isRecordNumber);L&&(s.some(t.guardFormField.isRecordNumber)||s.push(L));const f=Object.values(i).find(t.guardFormField.isCreator);f&&(s.some(t.guardFormField.isCreator)||s.push(f));const g=Object.values(i).find(t.guardFormField.isCreatedTime);g&&(s.some(t.guardFormField.isCreatedTime)||s.push(g));const C=Object.values(i).find(t.guardFormField.isModifier);C&&(s.some(t.guardFormField.isModifier)||s.push(C));const _=Object.values(i).find(t.guardFormField.isUpdatedTime);return _&&(s.some(t.guardFormField.isUpdatedTime)||s.push(_)),{fields:s,spacers:l}},a={get:async({client:i,app:c,lang:s,preview:l})=>{const[{properties:T},{layout:y}]=await Promise.all([i.app.getFormFields({app:c,lang:s,preview:l}),i.app.getFormLayout({app:c,preview:l})]);return I(T,y)},...Object.freeze(Object.defineProperty({__proto__:null,isCalc:i=>i.type==="CALC",isCategory:i=>i.type==="CATEGORY",isCheckBox:i=>i.type==="CHECK_BOX",isCreatedTime:i=>i.type==="CREATED_TIME",isCreator:i=>i.type==="CREATOR",isDate:i=>i.type==="DATE",isDatetime:i=>i.type==="DATETIME",isDropDown:i=>i.type==="DROP_DOWN",isFile:i=>i.type==="FILE",isGroup:i=>i.type==="GROUP",isGroupSelect:i=>i.type==="GROUP_SELECT",isLink:i=>i.type==="LINK",isLookup:i=>(i.type==="SINGLE_LINE_TEXT"||i.type==="NUMBER")&&"lookup"in i,isModifier:i=>i.type==="MODIFIER",isMultiLineText:i=>i.type==="MULTI_LINE_TEXT",isMultiSelect:i=>i.type==="MULTI_SELECT",isNumber:i=>i.type==="NUMBER",isOrganizationSelect:i=>i.type==="ORGANIZATION_SELECT",isRadioButton:i=>i.type==="RADIO_BUTTON",isRecordNumber:i=>i.type==="RECORD_NUMBER",isReferenceTable:i=>i.type==="REFERENCE_TABLE",isRichText:i=>i.type==="RICH_TEXT",isSingleLineText:i=>i.type==="SINGLE_LINE_TEXT",isStatus:i=>i.type==="STATUS",isStatusAssignee:i=>i.type==="STATUS_ASSIGNEE",isSubtable:i=>i.type==="SUBTABLE",isTime:i=>i.type==="TIME",isUpdatedTime:i=>i.type==="UPDATED_TIME",isUserSelect:i=>i.type==="USER_SELECT"},Symbol.toStringTag,{value:"Module"}))};E.kintonePrettyFields=a,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,143 @@
1
+ import * as property from "@kintone/rest-api-client/lib/src/KintoneFields/exportTypes/property";
2
+ export interface RecordNumber extends property.RecordNumber {
3
+ group?: string;
4
+ }
5
+ export interface Creator extends property.Creator {
6
+ group?: string;
7
+ }
8
+ export interface CreatedTime extends property.CreatedTime {
9
+ group?: string;
10
+ }
11
+ export interface Modifier extends property.Modifier {
12
+ group?: string;
13
+ }
14
+ export interface UpdatedTime extends property.UpdatedTime {
15
+ group?: string;
16
+ }
17
+ export interface SingleLineText extends property.SingleLineText {
18
+ table?: string;
19
+ group?: string;
20
+ isLookupCopy?: true;
21
+ }
22
+ export interface MultiLineText extends property.MultiLineText {
23
+ table?: string;
24
+ group?: string;
25
+ isLookupCopy?: true;
26
+ }
27
+ export interface RichText extends property.RichText {
28
+ table?: string;
29
+ group?: string;
30
+ isLookupCopy?: true;
31
+ }
32
+ export interface Number extends property.Number {
33
+ table?: string;
34
+ group?: string;
35
+ isLookupCopy?: true;
36
+ }
37
+ export interface Calc extends property.Calc {
38
+ table?: string;
39
+ group?: string;
40
+ }
41
+ export interface CheckBox extends property.CheckBox {
42
+ table?: string;
43
+ group?: string;
44
+ sortedOptions: string[];
45
+ isLookupCopy?: true;
46
+ }
47
+ export interface RadioButton extends property.RadioButton {
48
+ table?: string;
49
+ group?: string;
50
+ sortedOptions: string[];
51
+ isLookupCopy?: true;
52
+ }
53
+ export interface MultiSelect extends property.MultiSelect {
54
+ table?: string;
55
+ group?: string;
56
+ sortedOptions: string[];
57
+ isLookupCopy?: true;
58
+ }
59
+ export interface Dropdown extends property.Dropdown {
60
+ table?: string;
61
+ group?: string;
62
+ sortedOptions: string[];
63
+ isLookupCopy?: true;
64
+ }
65
+ export interface UserSelect extends property.UserSelect {
66
+ table?: string;
67
+ group?: string;
68
+ isLookupCopy?: true;
69
+ }
70
+ export interface OrganizationSelect extends property.OrganizationSelect {
71
+ table?: string;
72
+ group?: string;
73
+ isLookupCopy?: true;
74
+ }
75
+ export interface GroupSelect extends property.GroupSelect {
76
+ table?: string;
77
+ group?: string;
78
+ isLookupCopy?: true;
79
+ }
80
+ export interface Date extends property.Date {
81
+ table?: string;
82
+ group?: string;
83
+ isLookupCopy?: true;
84
+ }
85
+ export interface Time extends property.Time {
86
+ table?: string;
87
+ group?: string;
88
+ isLookupCopy?: true;
89
+ }
90
+ export interface DateTime extends property.DateTime {
91
+ table?: string;
92
+ group?: string;
93
+ isLookupCopy?: true;
94
+ }
95
+ export interface Link extends property.Link {
96
+ table?: string;
97
+ group?: string;
98
+ isLookupCopy?: true;
99
+ }
100
+ export interface File extends property.File {
101
+ table?: string;
102
+ group?: string;
103
+ }
104
+ export interface Lookup extends property.Lookup {
105
+ table?: string;
106
+ group?: string;
107
+ }
108
+ export type Subtable<T extends {
109
+ [fieldCode: string]: InSubtable;
110
+ }> = {
111
+ type: "SUBTABLE";
112
+ code: string;
113
+ label: string;
114
+ noLabel: boolean;
115
+ fields: T;
116
+ };
117
+ export type Group<T extends {
118
+ [fieldCode: string]: InGroup;
119
+ }> = {
120
+ type: "GROUP";
121
+ code: string;
122
+ label: string;
123
+ noLabel: boolean;
124
+ openGroup: boolean;
125
+ fields: T;
126
+ };
127
+ export interface ReferenceTable extends property.ReferenceTable {
128
+ group?: string;
129
+ }
130
+ export interface Category extends property.Category {
131
+ }
132
+ export interface Status extends property.Status {
133
+ }
134
+ export interface StatusAssignee extends property.StatusAssignee {
135
+ }
136
+ export type InSubtable = SingleLineText | Number | Calc | MultiLineText | RichText | Link | CheckBox | RadioButton | Dropdown | MultiSelect | File | Date | Time | DateTime | UserSelect | OrganizationSelect | GroupSelect | Lookup;
137
+ export type InGroup = RecordNumber | Creator | CreatedTime | Modifier | UpdatedTime | SingleLineText | Number | Calc | MultiLineText | RichText | Link | CheckBox | RadioButton | Dropdown | MultiSelect | File | Date | Time | DateTime | UserSelect | OrganizationSelect | GroupSelect | ReferenceTable | Lookup;
138
+ export type OneOf = RecordNumber | Creator | CreatedTime | Modifier | UpdatedTime | Category | Status | StatusAssignee | SingleLineText | Number | Calc | MultiLineText | RichText | Link | CheckBox | RadioButton | Dropdown | MultiSelect | File | Date | Time | DateTime | UserSelect | OrganizationSelect | GroupSelect | ReferenceTable | Group<{
139
+ [fieldCode: string]: InGroup;
140
+ }> | Lookup | Subtable<{
141
+ [fieldCode: string]: InSubtable;
142
+ }>;
143
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src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,GACX,QAAQ,GACR,MAAM,GACN,cAAc,GACd,cAAc,GACd,MAAM,GACN,IAAI,GACJ,aAAa,GACb,QAAQ,GACR,IAAI,GACJ,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,WAAW,GACX,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,QAAQ,GACR,UAAU,GACV,kBAAkB,GAClB,WAAW,GACX,cAAc,GACd,KAAK,CAAC;IACJ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9B,CAAC,GACF,MAAM,GACN,QAAQ,CAAC;IACP,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;CACjC,CAAC,CAAC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "files": [
5
5
  "dist"
6
6
  ],
7
- "version": "0.1.0",
7
+ "version": "0.3.0",
8
8
  "description": "Retrieve kintone form field(@kintone/rest-api-client) information in a pretty format.",
9
9
  "repository": {
10
10
  "type": "git",
@@ -21,10 +21,10 @@
21
21
  "homepage": "https://github.com/cy-takeuchi/kintone-pretty-fields",
22
22
  "main": "./dist/index.js",
23
23
  "module": "./dist/index.js",
24
- "types": "./dist/types/index.d.ts",
24
+ "types": "./dist/index.d.ts",
25
25
  "exports": {
26
26
  ".": {
27
- "types": "./dist/types/index.d.ts",
27
+ "types": "./dist/index.d.ts",
28
28
  "node": {
29
29
  "import": "./dist/index.js",
30
30
  "require": "./dist/index.umd.cjs",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@kintone/rest-api-client": "^5.0.3",
44
- "kintone-typeguard": "^0.6.0"
44
+ "kintone-typeguard": "^0.7.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^20.10.0",
@@ -1,36 +0,0 @@
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
@@ -1 +0,0 @@
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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AAM,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"}
@@ -1 +0,0 @@
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"}
@@ -1,46 +0,0 @@
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
@@ -1 +0,0 @@
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"}