@nocobase/plugin-field-sequence 1.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +9 -0
  3. package/README.zh-CN.md +9 -0
  4. package/client.d.ts +2 -0
  5. package/client.js +1 -0
  6. package/dist/client/SequenceFieldProvider.d.ts +2 -0
  7. package/dist/client/index.d.ts +5 -0
  8. package/dist/client/index.js +19 -0
  9. package/dist/client/locale/index.d.ts +3 -0
  10. package/dist/client/sequence.d.ts +259 -0
  11. package/dist/externalVersion.js +14 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.js +39 -0
  14. package/dist/locale/en-US.json +24 -0
  15. package/dist/locale/es-ES.json +24 -0
  16. package/dist/locale/fr-FR.json +24 -0
  17. package/dist/locale/ko_KR.json +24 -0
  18. package/dist/locale/pt-BR.json +24 -0
  19. package/dist/locale/zh-CN.json +25 -0
  20. package/dist/node_modules/cron-parser/.eslintrc.json +15 -0
  21. package/dist/node_modules/cron-parser/.travis.yml +7 -0
  22. package/dist/node_modules/cron-parser/LICENSE +21 -0
  23. package/dist/node_modules/cron-parser/component.json +11 -0
  24. package/dist/node_modules/cron-parser/index.d.ts +1 -0
  25. package/dist/node_modules/cron-parser/lib/date.js +252 -0
  26. package/dist/node_modules/cron-parser/lib/expression.js +983 -0
  27. package/dist/node_modules/cron-parser/lib/field_compactor.js +70 -0
  28. package/dist/node_modules/cron-parser/lib/field_stringify.js +38 -0
  29. package/dist/node_modules/cron-parser/lib/parser.js +1 -0
  30. package/dist/node_modules/cron-parser/node_modules/luxon/build/amd/luxon.js +8489 -0
  31. package/dist/node_modules/cron-parser/node_modules/luxon/build/cjs-browser/luxon.js +8487 -0
  32. package/dist/node_modules/cron-parser/node_modules/luxon/build/global/luxon.js +8490 -0
  33. package/dist/node_modules/cron-parser/node_modules/luxon/build/global/luxon.min.js +1 -0
  34. package/dist/node_modules/cron-parser/node_modules/luxon/build/node/luxon.js +7522 -0
  35. package/dist/node_modules/cron-parser/node_modules/luxon/package.json +96 -0
  36. package/dist/node_modules/cron-parser/node_modules/luxon/src/datetime.js +2169 -0
  37. package/dist/node_modules/cron-parser/node_modules/luxon/src/duration.js +880 -0
  38. package/dist/node_modules/cron-parser/node_modules/luxon/src/errors.js +61 -0
  39. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/conversions.js +157 -0
  40. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/diff.js +80 -0
  41. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/digits.js +76 -0
  42. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/english.js +233 -0
  43. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/formats.js +191 -0
  44. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/formatter.js +386 -0
  45. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/invalid.js +14 -0
  46. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/locale.js +482 -0
  47. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/regexParser.js +335 -0
  48. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/tokenParser.js +424 -0
  49. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/util.js +292 -0
  50. package/dist/node_modules/cron-parser/node_modules/luxon/src/impl/zoneUtil.js +36 -0
  51. package/dist/node_modules/cron-parser/node_modules/luxon/src/info.js +193 -0
  52. package/dist/node_modules/cron-parser/node_modules/luxon/src/interval.js +602 -0
  53. package/dist/node_modules/cron-parser/node_modules/luxon/src/luxon.js +26 -0
  54. package/dist/node_modules/cron-parser/node_modules/luxon/src/luxonFilled.js +13 -0
  55. package/dist/node_modules/cron-parser/node_modules/luxon/src/settings.js +137 -0
  56. package/dist/node_modules/cron-parser/node_modules/luxon/src/zone.js +88 -0
  57. package/dist/node_modules/cron-parser/node_modules/luxon/src/zones/IANAZone.js +191 -0
  58. package/dist/node_modules/cron-parser/node_modules/luxon/src/zones/fixedOffsetZone.js +94 -0
  59. package/dist/node_modules/cron-parser/node_modules/luxon/src/zones/invalidZone.js +53 -0
  60. package/dist/node_modules/cron-parser/node_modules/luxon/src/zones/localZone.js +63 -0
  61. package/dist/node_modules/cron-parser/package.json +1 -0
  62. package/dist/node_modules/cron-parser/test/31_of_month.js +17 -0
  63. package/dist/node_modules/cron-parser/test/bug.js +29 -0
  64. package/dist/node_modules/cron-parser/test/crondate.js +16 -0
  65. package/dist/node_modules/cron-parser/test/crontab.example +7 -0
  66. package/dist/node_modules/cron-parser/test/empty_around_comma.js +22 -0
  67. package/dist/node_modules/cron-parser/test/expression.js +1489 -0
  68. package/dist/node_modules/cron-parser/test/field_compactor.js +250 -0
  69. package/dist/node_modules/cron-parser/test/field_stringify.js +84 -0
  70. package/dist/node_modules/cron-parser/test/fields.js +32 -0
  71. package/dist/node_modules/cron-parser/test/increment_on_first_iteration.js +22 -0
  72. package/dist/node_modules/cron-parser/test/index-ts3.test-d.ts +133 -0
  73. package/dist/node_modules/cron-parser/test/index.test-d.ts +138 -0
  74. package/dist/node_modules/cron-parser/test/leap_year.js +17 -0
  75. package/dist/node_modules/cron-parser/test/parser.js +46 -0
  76. package/dist/node_modules/cron-parser/test/parser_crondate_formats.js +145 -0
  77. package/dist/node_modules/cron-parser/test/parser_day_of_month.js +169 -0
  78. package/dist/node_modules/cron-parser/test/prev_date.js +32 -0
  79. package/dist/node_modules/cron-parser/test/stringify.js +402 -0
  80. package/dist/node_modules/cron-parser/test/timezone.js +422 -0
  81. package/dist/node_modules/cron-parser/types/common.d.ts +131 -0
  82. package/dist/node_modules/cron-parser/types/index.d.ts +45 -0
  83. package/dist/node_modules/cron-parser/types/ts3/index.d.ts +28 -0
  84. package/dist/server/Plugin.d.ts +8 -0
  85. package/dist/server/Plugin.js +124 -0
  86. package/dist/server/collections/sequences.d.ts +2 -0
  87. package/dist/server/collections/sequences.js +88 -0
  88. package/dist/server/fields/sequence-field.d.ts +38 -0
  89. package/dist/server/fields/sequence-field.js +386 -0
  90. package/dist/server/index.d.ts +2 -0
  91. package/dist/server/index.js +39 -0
  92. package/dist/server/migrations/20221207022250-sequence-field-key.d.ts +6 -0
  93. package/dist/server/migrations/20221207022250-sequence-field-key.js +85 -0
  94. package/dist/server/migrations/20240425225438-change-locale-module.d.ts +6 -0
  95. package/dist/server/migrations/20240425225438-change-locale-module.js +42 -0
  96. package/package.json +36 -0
  97. package/server.d.ts +2 -0
  98. package/server.js +1 -0
package/client.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './dist/client';
2
+ export { default } from './dist/client';
package/client.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/client/index.js');
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const SequenceFieldProvider: FC;
@@ -0,0 +1,5 @@
1
+ import { Plugin } from '@nocobase/client';
2
+ export declare class PluginFieldSequenceClient extends Plugin {
3
+ load(): Promise<void>;
4
+ }
5
+ export default PluginFieldSequenceClient;
@@ -0,0 +1,19 @@
1
+ (function(o,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("@formily/antd-v5"),require("@formily/core"),require("@formily/react"),require("@nocobase/utils/client"),require("antd"),require("react"),require("react-i18next")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","@formily/antd-v5","@formily/core","@formily/react","@nocobase/utils/client","antd","react","react-i18next"],e):(o=typeof globalThis!="undefined"?globalThis:o||self,e(o["@nocobase/plugin-field-sequence"]={},o["@nocobase/client"],o.jsxRuntime,o["@formily/antd-v5"],o["@formily/core"],o["@formily/react"],o["@nocobase/utils"],o.antd,o.react,o["react-i18next"]))})(this,function(o,e,t,u,g,f,q,d,m,b){"use strict";var Y=Object.defineProperty,z=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var I=(o,e,t)=>e in o?Y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,v=(o,e)=>{for(var t in e||(e={}))E.call(e,t)&&I(o,t,e[t]);if(A)for(var t of A(e))_.call(e,t)&&I(o,t,e[t]);return o},C=(o,e)=>z(o,B(e));var a=(o,e,t)=>(I(o,typeof e!="symbol"?e+"":e,t),t);var j=(o,e,t)=>new Promise((u,g)=>{var f=m=>{try{d(t.next(m))}catch(b){g(b)}},q=m=>{try{d(t.throw(m))}catch(b){g(b)}},d=m=>m.done?u(m.value):Promise.resolve(m.value).then(f,q);d((t=t.apply(o,e)).next())});const s="field-sequence";function O(n,i={}){return e.i18n.t(n,C(v({},i),{ns:s}))}function P(n){const i=e.useCompile(),{setValuesIn:l}=f.useForm(),c=u.ArrayTable.useIndex();return f.useFormEffects(()=>{g.onFieldValueChange(`patterns.${c}.type`,r=>{l(`patterns.${c}.options`,{})})}),t.jsx(d.Select,C(v({popupMatchSelectWidth:!1},n),{children:Object.keys(F).map(r=>t.jsx(d.Select.Option,{value:r,children:i(F[r].title)},r))}))}function M(){const n=e.useCompile(),{values:i}=f.useForm(),l=u.ArrayTable.useIndex(),{type:c,options:r}=i.patterns[l],y=F[c];return t.jsx("div",{className:e.css`
2
+ display: flex;
3
+ gap: 1em;
4
+ flex-wrap: wrap;
5
+ `,children:Object.keys(r).filter(p=>typeof r[p]!="undefined"&&y.optionRenders[p]).map(p=>{const S=y.optionRenders[p],{title:x}=y.fieldset[p];return S?t.jsxs("dl",{className:e.css`
6
+ margin: 0;
7
+ padding: 0;
8
+ `,children:[t.jsx("dt",{children:n(x)}),t.jsx("dd",{className:e.css`
9
+ margin-bottom: 0;
10
+ `,children:t.jsx(S,{value:r[p]},p)})]},p):null})})}const F={string:{title:`{{t("Fixed text", { ns: "${s}" })}}`,optionRenders:{value(n={value:""}){return t.jsx("code",{children:n.value})}},fieldset:{value:{type:"string",title:`{{t("Text content", { ns: "${s}" })}}`,"x-decorator":"FormItem","x-component":"Input"}}},integer:{title:`{{t("Autoincrement", { ns: "${s}" })}}`,optionRenders:{digits:function({value:i}){return t.jsx("code",{children:i})},start:function({value:i}){return t.jsx("code",{children:i})},cycle:e.Cron.ReadPretty},fieldset:{digits:{type:"number",title:`{{t("Digits", { ns: "${s}" })}}`,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:1,max:10},required:!0,default:1,"x-reactions":{target:"start",fulfill:{schema:{"x-component-props.max":"{{ 10 ** $self.value - 1 }}"}}}},start:{type:"number",title:`{{t("Start from", { ns: "${s}" })}}`,"x-decorator":"FormItem","x-component":"InputNumber","x-component-props":{min:0},required:!0,default:0},cycle:{type:"string",title:`{{t("Reset cycle", { ns: "${s}" })}}`,"x-decorator":"FormItem","x-component"({value:n,onChange:i}){const l=[{label:"No reset",value:0},{label:"Daily",value:1,cron:"0 0 * * *"},{label:"Every Monday",value:2,cron:"0 0 * * 1"},{label:"Monthly",value:3,cron:"0 0 1 * *"},{label:"Yearly",value:4,cron:"0 0 1 1 *"},{label:"Customize",value:5,cron:"* * * * *"}],c=typeof n=="undefined"?l[0]:l.find(r=>r.cron==n)||l[5];return t.jsxs("fieldset",{children:[t.jsx(d.Select,{value:c.value,onChange:r=>i(l[r].cron),children:l.map(r=>t.jsx(d.Select.Option,{value:r.value,children:O(r.label)},r.value))}),c.value===5?t.jsx(e.Cron,{value:n,onChange:i,clearButton:!1}):null]})},default:null}}},date:{title:`{{t("Date", { ns: "${s}" })}}`,optionRenders:{format(n={value:"YYYYMMDD"}){return t.jsx("code",{children:n.value})}}}};function $(){const{t:n}=b.useTranslation(),i=e.useCompile(),l=m.useContext(f.SchemaOptionsContext),{values:c,setValuesIn:r}=f.useForm(),y=u.ArrayTable.useIndex(),{type:p,options:S}=c.patterns[y],x=F[p],{token:w}=e.useToken();return x!=null&&x.fieldset?t.jsx(d.Button,{type:"link",onClick:()=>{u.FormDrawer({title:i(x.title),zIndex:w.zIndexPopupBase+1e3},()=>t.jsxs(u.FormLayout,{layout:"vertical",children:[t.jsx(e.SchemaComponentOptions,{scope:l.scope,components:l.components,children:t.jsx(e.SchemaComponent,{schema:{type:"object","x-component":"fieldset",properties:x.fieldset}})}),t.jsx(u.FormDrawer.Footer,{children:t.jsx(u.FormButtonGroup,{className:e.css`
11
+ justify-content: flex-end;
12
+ `,children:t.jsx(u.Submit,{onSubmit:h=>h,children:n("Submit")})})})]})).open({initialValues:S}).then(h=>{r(`patterns.${y}`,{type:p,options:v({},h)})}).catch(h=>{q.error(h)})},children:n("Configure")}):null}class D extends e.CollectionFieldInterface{constructor(){super(...arguments);a(this,"name","sequence");a(this,"type","object");a(this,"group","advanced");a(this,"order",3);a(this,"title",`{{t("Sequence", { ns: "${s}" })}}`);a(this,"description",`{{t("Automatically generate codes based on configured rules, supporting combinations of dates, numbers, and text.", { ns: "${s}" })}}`);a(this,"sortable",!0);a(this,"default",{type:"sequence",uiSchema:{type:"string","x-component":"Input","x-component-props":{}}});a(this,"availableTypes",["string"]);a(this,"hasDefaultValue",!1);a(this,"filterable",{operators:e.interfacesProperties.operators.string});a(this,"titleUsable",!0);a(this,"properties",C(v({},e.interfacesProperties.defaultProps),{unique:e.interfacesProperties.unique,patterns:{type:"array",title:`{{t("Sequence rules", { ns: "${s}" })}}`,required:!0,"x-decorator":"FormItem","x-component":"ArrayTable",items:{type:"object",properties:{sort:{type:"void","x-component":"ArrayTable.Column","x-component-props":{width:50,title:"",align:"center"},properties:{sort:{type:"void","x-component":"ArrayTable.SortHandle"}}},type:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:`{{t("Type", { ns: "${s}" })}}`},properties:{type:{type:"string",name:"type",required:!0,"x-decorator":"FormItem","x-component":P}}},options:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:`{{t("Rule content", { ns: "${s}" })}}`},properties:{options:{type:"object",name:"options","x-component":M}}},operations:{type:"void","x-component":"ArrayTable.Column","x-component-props":{title:`{{t("Operations", { ns: "${s}" })}}`,dataIndex:"operations",fixed:"right",className:e.css`
13
+ > *:not(:last-child) {
14
+ margin-right: 0.5em;
15
+ }
16
+ button {
17
+ padding: 0;
18
+ }
19
+ `},properties:{config:{type:"void",properties:{options:{type:"object","x-component":$}}},remove:{type:"void","x-component":"ArrayTable.Remove"}}}}},properties:{add:{type:"void","x-component":"ArrayTable.Addition","x-component-props":{defaultValue:{type:"integer",options:{digits:1,start:0}}},title:`{{t("Add rule", { ns: "${s}" })}}`}}},inputable:{type:"boolean",title:`{{t("Inputable", { ns: "${s}" })}}`,"x-decorator":"FormItem","x-component":"Checkbox"},match:{type:"boolean",title:`{{t("Match rules", { ns: "${s}" })}}`,"x-decorator":"FormItem","x-component":"Checkbox","x-reactions":{dependencies:["inputable"],fulfill:{state:{value:"{{$deps[0] && $self.value}}",visible:"{{$deps[0] === true}}"}}}}}))}schemaInitialize(l,{block:c,field:r}){return c==="Form"&&Object.assign(l["x-component-props"],{disabled:!r.inputable}),l}}const N=n=>t.jsx(e.SchemaComponentOptions,{components:{RuleConfigForm:$},children:n.children});class T extends e.Plugin{load(){return j(this,null,function*(){this.app.use(N),this.app.dataSourceManager.addFieldInterfaces([D])})}}o.PluginFieldSequenceClient=T,o.default=T,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,3 @@
1
+ export declare const NAMESPACE = "field-sequence";
2
+ export declare function lang(key: string, options?: {}): string;
3
+ export declare function usePluginTranslation(): import("react-i18next").UseTranslationResponse<"field-sequence", undefined>;
@@ -0,0 +1,259 @@
1
+ import { ISchema } from '@formily/react';
2
+ import { CollectionFieldInterface } from '@nocobase/client';
3
+ import React from 'react';
4
+ declare function RuleTypeSelect(props: any): React.JSX.Element;
5
+ declare function RuleOptions(): React.JSX.Element;
6
+ export declare function RuleConfigForm(): React.JSX.Element;
7
+ export declare class SequenceFieldInterface extends CollectionFieldInterface {
8
+ name: string;
9
+ type: string;
10
+ group: string;
11
+ order: number;
12
+ title: string;
13
+ description: string;
14
+ sortable: boolean;
15
+ default: {
16
+ type: string;
17
+ uiSchema: {
18
+ type: string;
19
+ 'x-component': string;
20
+ 'x-component-props': {};
21
+ };
22
+ };
23
+ availableTypes: string[];
24
+ hasDefaultValue: boolean;
25
+ filterable: {
26
+ operators: ({
27
+ label: string;
28
+ value: string;
29
+ selected: boolean;
30
+ noValue?: undefined;
31
+ } | {
32
+ label: string;
33
+ value: string;
34
+ selected?: undefined;
35
+ noValue?: undefined;
36
+ } | {
37
+ label: string;
38
+ value: string;
39
+ noValue: boolean;
40
+ selected?: undefined;
41
+ })[];
42
+ };
43
+ titleUsable: boolean;
44
+ schemaInitialize(schema: ISchema, { block, field }: {
45
+ block: any;
46
+ field: any;
47
+ }): import("@formily/react").Stringify<{
48
+ [key: symbol]: any;
49
+ [key: `x-${string}`]: any;
50
+ [key: `x-${number}`]: any;
51
+ version?: string;
52
+ name?: import("@formily/react").SchemaKey;
53
+ title?: any;
54
+ description?: any;
55
+ default?: any;
56
+ readOnly?: boolean;
57
+ writeOnly?: boolean;
58
+ type?: import("@formily/react").SchemaTypes;
59
+ enum?: import("@formily/react").SchemaEnum<any>;
60
+ const?: any;
61
+ multipleOf?: number;
62
+ maximum?: number;
63
+ exclusiveMaximum?: number;
64
+ minimum?: number;
65
+ exclusiveMinimum?: number;
66
+ maxLength?: number;
67
+ minLength?: number;
68
+ pattern?: string | RegExp;
69
+ maxItems?: number;
70
+ minItems?: number;
71
+ uniqueItems?: boolean;
72
+ maxProperties?: number;
73
+ minProperties?: number;
74
+ required?: string | boolean | string[];
75
+ format?: string;
76
+ $ref?: string;
77
+ $namespace?: string;
78
+ definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
79
+ properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
80
+ items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
81
+ additionalItems?: import("@formily/react").Stringify<any>;
82
+ patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
83
+ additionalProperties?: import("@formily/react").Stringify<any>;
84
+ "x-value"?: any;
85
+ "x-index"?: number;
86
+ "x-pattern"?: any;
87
+ "x-display"?: any;
88
+ "x-validator"?: any;
89
+ "x-decorator"?: any;
90
+ "x-decorator-props"?: any;
91
+ "x-component"?: any;
92
+ "x-component-props"?: any;
93
+ "x-reactions"?: import("@formily/react").SchemaReactions<any>;
94
+ "x-content"?: any;
95
+ "x-data"?: any;
96
+ "x-visible"?: boolean;
97
+ "x-hidden"?: boolean;
98
+ "x-disabled"?: boolean;
99
+ "x-editable"?: boolean;
100
+ "x-read-only"?: boolean;
101
+ "x-read-pretty"?: boolean;
102
+ "x-compile-omitted"?: string[];
103
+ }>;
104
+ properties: {
105
+ unique: {
106
+ type: string;
107
+ 'x-content': string;
108
+ 'x-decorator': string;
109
+ 'x-component': string;
110
+ 'x-disabled': string;
111
+ 'x-reactions': {
112
+ dependencies: string[];
113
+ when: string;
114
+ fulfill: {
115
+ state: {
116
+ value: boolean;
117
+ };
118
+ };
119
+ }[];
120
+ };
121
+ patterns: {
122
+ type: string;
123
+ title: string;
124
+ required: boolean;
125
+ 'x-decorator': string;
126
+ 'x-component': string;
127
+ items: {
128
+ type: string;
129
+ properties: {
130
+ sort: {
131
+ type: string;
132
+ 'x-component': string;
133
+ 'x-component-props': {
134
+ width: number;
135
+ title: string;
136
+ align: string;
137
+ };
138
+ properties: {
139
+ sort: {
140
+ type: string;
141
+ 'x-component': string;
142
+ };
143
+ };
144
+ };
145
+ type: {
146
+ type: string;
147
+ 'x-component': string;
148
+ 'x-component-props': {
149
+ title: string;
150
+ };
151
+ properties: {
152
+ type: {
153
+ type: string;
154
+ name: string;
155
+ required: boolean;
156
+ 'x-decorator': string;
157
+ 'x-component': typeof RuleTypeSelect;
158
+ };
159
+ };
160
+ };
161
+ options: {
162
+ type: string;
163
+ 'x-component': string;
164
+ 'x-component-props': {
165
+ title: string;
166
+ };
167
+ properties: {
168
+ options: {
169
+ type: string;
170
+ name: string;
171
+ 'x-component': typeof RuleOptions;
172
+ };
173
+ };
174
+ };
175
+ operations: {
176
+ type: string;
177
+ 'x-component': string;
178
+ 'x-component-props': {
179
+ title: string;
180
+ dataIndex: string;
181
+ fixed: string;
182
+ className: string;
183
+ };
184
+ properties: {
185
+ config: {
186
+ type: string;
187
+ properties: {
188
+ options: {
189
+ type: string;
190
+ 'x-component': typeof RuleConfigForm;
191
+ };
192
+ };
193
+ };
194
+ remove: {
195
+ type: string;
196
+ 'x-component': string;
197
+ };
198
+ };
199
+ };
200
+ };
201
+ };
202
+ properties: {
203
+ add: {
204
+ type: string;
205
+ 'x-component': string;
206
+ 'x-component-props': {
207
+ defaultValue: {
208
+ type: string;
209
+ options: {
210
+ digits: number;
211
+ start: number;
212
+ };
213
+ };
214
+ };
215
+ title: string;
216
+ };
217
+ };
218
+ };
219
+ inputable: {
220
+ type: string;
221
+ title: string;
222
+ 'x-decorator': string;
223
+ 'x-component': string;
224
+ };
225
+ match: {
226
+ type: string;
227
+ title: string;
228
+ 'x-decorator': string;
229
+ 'x-component': string;
230
+ 'x-reactions': {
231
+ dependencies: string[];
232
+ fulfill: {
233
+ state: {
234
+ value: string;
235
+ visible: string;
236
+ };
237
+ };
238
+ };
239
+ };
240
+ 'uiSchema.title': {
241
+ type: string;
242
+ title: string;
243
+ required: boolean;
244
+ 'x-decorator': string;
245
+ 'x-component': string;
246
+ };
247
+ name: {
248
+ type: string;
249
+ title: string;
250
+ required: boolean;
251
+ 'x-disabled': string;
252
+ 'x-decorator': string;
253
+ 'x-component': string;
254
+ 'x-validator': string;
255
+ description: string;
256
+ };
257
+ };
258
+ }
259
+ export {};
@@ -0,0 +1,14 @@
1
+ module.exports = {
2
+ "react": "18.2.0",
3
+ "@nocobase/client": "1.0.0-alpha.1",
4
+ "@formily/antd-v5": "1.1.9",
5
+ "@formily/core": "2.3.0",
6
+ "@formily/react": "2.3.0",
7
+ "@nocobase/utils": "1.0.0-alpha.1",
8
+ "antd": "5.12.8",
9
+ "react-i18next": "11.18.6",
10
+ "@nocobase/server": "1.0.0-alpha.1",
11
+ "@nocobase/database": "1.0.0-alpha.1",
12
+ "dayjs": "1.11.10",
13
+ "lodash": "4.17.21"
14
+ };
@@ -0,0 +1,2 @@
1
+ export * from './server';
2
+ export { default } from './server';
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var src_exports = {};
30
+ __export(src_exports, {
31
+ default: () => import_server.default
32
+ });
33
+ module.exports = __toCommonJS(src_exports);
34
+ __reExport(src_exports, require("./server"), module.exports);
35
+ var import_server = __toESM(require("./server"));
36
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ ...require("./server")
39
+ });
@@ -0,0 +1,24 @@
1
+ {
2
+ "Sequence": "Sequence",
3
+ "Sequence rules": "Sequence rules",
4
+ "Add rule": "Add rule",
5
+ "Inputable": "Inputable",
6
+ "Match rules": "Match rules",
7
+ "Type": "Type",
8
+ "Autoincrement": "Autoincrement",
9
+ "Fixed text": "Fixed text",
10
+ "Text content": "Text content",
11
+ "Rule content": "Rule content",
12
+ "{{value}} Digits": "{{value}} Digits",
13
+ "Digits": "Digits",
14
+ "Start from": "Start from",
15
+ "Starts from {{value}}": "Starts from {{value}}",
16
+ "Reset cycle": "Reset cycle",
17
+ "No reset": "No reset",
18
+ "Daily": "Daily",
19
+ "Every Monday": "Every Monday",
20
+ "Monthly": "Monthly",
21
+ "Yearly": "Yearly",
22
+ "Operations": "Operations",
23
+ "Customize": "Customize"
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "Sequence": "Secuencia",
3
+ "Sequence rules": "Reglas de secuencia",
4
+ "Add rule": "Añadir regla",
5
+ "Inputable": "Inputable",
6
+ "Match rules": "Emparejar reglas",
7
+ "Type": "Tipo",
8
+ "Autoincrement": "Autoincremento",
9
+ "Fixed text": "Texto fijo",
10
+ "Text content": "Contenido del texto",
11
+ "Rule content": "Contenido de la regla",
12
+ "{{value}} Digits": "{{value}} Dígitos",
13
+ "Digits": "Dígitos",
14
+ "Start from": "Empezar desde",
15
+ "Starts from {{value}}": " Empieza a partir de {{value}}",
16
+ "Reset cycle": "Reinicia ciclo",
17
+ "No reset": "Sin reinicio",
18
+ "Daily": "Diario",
19
+ "Every Monday": "Todos los lunes",
20
+ "Monthly": "Mensualmente",
21
+ "Yearly": "Anual",
22
+ "Operations": "Operaciones",
23
+ "Customize": "Personalizar"
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "Sequence": "Séquence",
3
+ "Sequence rules": "Règles de séquence",
4
+ "Add rule": "Ajouter une règle",
5
+ "Inputable": "Modifiable",
6
+ "Match rules": "Règles de correspondance",
7
+ "Type": "Type",
8
+ "Autoincrement": "Incrémentation automatique",
9
+ "Fixed text": "Texte fixe",
10
+ "Text content": "Contenu du texte",
11
+ "Rule content": "Contenu de la règle",
12
+ "{{value}} Digits": "{{value}} chiffres",
13
+ "Digits": "Chiffres",
14
+ "Start from": "Commencer à partir de",
15
+ "Starts from {{value}}": "Commence à partir de {{value}}",
16
+ "Reset cycle": "Cycle de réinitialisation",
17
+ "No reset": "Pas de réinitialisation",
18
+ "Daily": "Quotidien",
19
+ "Every Monday": "Chaque lundi",
20
+ "Monthly": "Mensuel",
21
+ "Yearly": "Annuel",
22
+ "Operations": "Opérations",
23
+ "Customize": "Personnaliser"
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "Sequence": "자동 코드",
3
+ "Sequence rules": "순차 규칙",
4
+ "Add rule": "규칙 추가",
5
+ "Inputable": "입력 가능",
6
+ "Match rules": "규칙과 일치해야 함",
7
+ "Type": "유형",
8
+ "Autoincrement": "자동 증가",
9
+ "Fixed text": "고정 텍스트",
10
+ "Text content": "텍스트 내용",
11
+ "Rule content": "규칙 내용",
12
+ "{{value}} Digits": "{{value}} 자리 숫자",
13
+ "Digits": "자릿수",
14
+ "Start from": "시작일",
15
+ "Starts from {{value}}": "{{value}}에서 시작",
16
+ "Reset cycle": "초기화 주기",
17
+ "No reset": "초기화 없음",
18
+ "Daily": "매일",
19
+ "Every Monday": "매주 월요일",
20
+ "Monthly": "매월",
21
+ "Yearly": "매년",
22
+ "Operations": "조작",
23
+ "Customize": "사용자 정의"
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "Sequence": "Sequência",
3
+ "Sequence rules": "Regras de sequência",
4
+ "Add rule": "Adicionar regra",
5
+ "Inputable": "Inserível",
6
+ "Match rules": "Regras de correspondência",
7
+ "Type": "Tipo",
8
+ "Autoincrement": "Autoincremento",
9
+ "Fixed text": "Texto fixo",
10
+ "Text content": "Conteúdo de texto",
11
+ "Rule content": "Conteúdo da regra",
12
+ "{{value}} Digits": "{{value}} Dígitos",
13
+ "Digits": "Dígitos",
14
+ "Start from": "Começa a partir de",
15
+ "Starts from {{value}}": "Começa a partir de {{value}}",
16
+ "Reset cycle": "Ciclo de reinício",
17
+ "No reset": "Sem reinício",
18
+ "Daily": "Diariamente",
19
+ "Every Monday": "Toda segunda-feira",
20
+ "Monthly": "Mensalmente",
21
+ "Yearly": "Anualmente",
22
+ "Operations": "Operações",
23
+ "Customize": "Personalizar"
24
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "Sequence": "自动编码",
3
+ "Automatically generate codes based on configured rules, supporting combinations of dates, numbers, and text.": "根据配置的规则自动生成编码,支持日期、数字、文本的组合。",
4
+ "Sequence rules": "编号规则",
5
+ "Add rule": "添加规则",
6
+ "Inputable": "可输入",
7
+ "Match rules": "输入必须匹配规则",
8
+ "Type": "类型",
9
+ "Autoincrement": "自增数字",
10
+ "Fixed text": "固定文本",
11
+ "Text content": "文本内容",
12
+ "Rule content": "规则内容",
13
+ "{{value}} Digits": "{{value}} 位数字",
14
+ "Digits": "位数",
15
+ "Start from": "起始于",
16
+ "Starts from {{value}}": "从 {{value}} 开始",
17
+ "Reset cycle": "重置周期",
18
+ "No reset": "不重置",
19
+ "Daily": "每天",
20
+ "Every Monday": "每周一",
21
+ "Monthly": "每月",
22
+ "Yearly": "每年",
23
+ "Operations": "操作",
24
+ "Customize": "自定义"
25
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "rules": {
3
+ "eol-last": ["error", "always"],
4
+ "quotes": ["error", "single"],
5
+ "semi": ["error", "always"]
6
+ },
7
+ "overrides": [
8
+ {
9
+ "files": ["test/**.js"],
10
+ "parserOptions": {
11
+ "ecmaVersion": 6
12
+ }
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,7 @@
1
+ language: node_js
2
+ node_js:
3
+ - '12'
4
+ - '14'
5
+ - '15'
6
+ - '16'
7
+ - '17'
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014-2016 Harri Siirak
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "cron-parser",
3
+ "repo": "harrisiirak/cron-parser",
4
+ "description": "Node.js library for parsing crontab instructions",
5
+ "version": "4.3.0",
6
+ "keywords": ["cron", "crontab", "parser"],
7
+ "dependencies": {},
8
+ "development": {},
9
+ "main": "lib/parser.js",
10
+ "scripts": ["lib/parser.js", "lib/expression.js", "lib/date.js", "lib/field_compactor.js", "lib/field_stringify.js"]
11
+ }
@@ -0,0 +1 @@
1
+ export * from './types'