@zerotal/admin 1.7.2 → 1.7.4

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 (2) hide show
  1. package/api-surface.md +14 -14
  2. package/package.json +9 -9
package/api-surface.md CHANGED
@@ -100,6 +100,7 @@ class AdminPage = {
100
100
  static slug: string
101
101
  static title: string
102
102
  static using: Compose
103
+ $: (strings: TemplateStringsArray, ...values: unknown[]) => void
103
104
  $refresh: () => void
104
105
  $set: (key: string, value: unknown) => void
105
106
  _applyClientUpdate: (key: string, value: unknown, arrayKey?: string) => Promise<void>
@@ -121,10 +122,10 @@ class AdminPage = {
121
122
  _prevChildIds: string[]
122
123
  _redirectStatus: number | null
123
124
  _redirectUrl: string | null
125
+ _resolveTitle: () => string | null
124
126
  _shouldRefresh: boolean
125
127
  _streamSender: ((ref: string, content: string, replace: boolean) => void) | null
126
128
  _taskSignal: AbortSignal | null
127
- _titleValue: string | null
128
129
  _validateField: (field: string) => Promise<void>
129
130
  addError: (field: string, message: string) => void
130
131
  bind: (key: string, optionValue?: string) => Record<string, unknown>
@@ -132,7 +133,7 @@ class AdminPage = {
132
133
  child: <C extends Component>(ChildClass: new () => C, opts?: { key?: string | number; props?: Partial<C>; lazy?: boolean; defer?: boolean; stream?: boolean; slots?: Record<string, string>;}) => Promise<HtmlNode>
133
134
  clearDurable: () => void
134
135
  client: (script: string) => void
135
- currentUrl: (_options?: CurrentUrlOptions) => string
136
+ currentUrl: (options?: CurrentUrlOptions) => string
136
137
  dispatch: <K extends string>(name: K, ...args: K extends EventName ? EventArgs<FlowEvents[K]> : [payload?: Record<string, unknown>]) => void
137
138
  dispatchSelf: <K extends string>(name: K, ...args: K extends EventName ? EventArgs<FlowEvents[K]> : [payload?: Record<string, unknown>]) => void
138
139
  dispatchTo: <K extends string>(component: string, name: K, ...args: K extends EventName ? EventArgs<FlowEvents[K]> : [payload?: Record<string, unknown>]) => void
@@ -141,7 +142,7 @@ class AdminPage = {
141
142
  flash: (message: string, optionsOrLevel?: FlashLevel | FlashOptions) => FlashBuilder
142
143
  hasSlot: (name?: string) => boolean
143
144
  layout: (page: HtmlNode) => HtmlNode | Promise<HtmlNode>
144
- navigateCurrent: (_options?: CurrentUrlOptions) => Promise<void>
145
+ navigateCurrent: (options?: CurrentUrlOptions) => Promise<void>
145
146
  onBoot: (_ctx?: HttpContext) => Promise<void>
146
147
  onDehydrate: () => Promise<void>
147
148
  onError: (error: Error) => Promise<void>
@@ -162,7 +163,6 @@ class AdminPage = {
162
163
  signal: AbortSignal
163
164
  slot: (name?: string) => HtmlNode
164
165
  stream: (ref: string, content: string, opts?: { replace?: boolean;}) => void
165
- title: { (): string; (value: string): void;}
166
166
  validate: (rulesOrForm?: ValidationRules | { __isFlowForm: true; _validateToErrors(): Record<string, string[]>;}) => Promise<void>
167
167
  }
168
168
 
@@ -1708,7 +1708,7 @@ interface WidgetContribution = {
1708
1708
  widget: DashboardWidget
1709
1709
  }
1710
1710
 
1711
- type ActionColor = 'primary' | 'success' | 'muted' | 'destructive' | 'default'
1711
+ type ActionColor = 'default' | 'primary' | 'success' | 'muted' | 'destructive'
1712
1712
 
1713
1713
  type ActionHandler = (ctx: ActionContext) => void | Promise<void>
1714
1714
 
@@ -1720,9 +1720,9 @@ type AdminAuthorizer = (ability: string) => boolean | Promise<boolean>
1720
1720
 
1721
1721
  type AdminPageClass = typeof AdminPage & (new () => AdminPage)
1722
1722
 
1723
- type BadgeTone = 'primary' | 'success' | 'muted' | 'destructive' | 'default'
1723
+ type BadgeTone = 'default' | 'primary' | 'success' | 'muted' | 'destructive'
1724
1724
 
1725
- type CalloutTone = 'primary' | 'success' | 'destructive' | 'default' | 'warning'
1725
+ type CalloutTone = 'default' | 'primary' | 'success' | 'warning' | 'destructive'
1726
1726
 
1727
1727
  type CellAlign = 'start' | 'center' | 'end'
1728
1728
 
@@ -1738,11 +1738,11 @@ type Conjunction = 'and' | 'or'
1738
1738
 
1739
1739
  type ConsoleRow = { [x: string]: unknown;}
1740
1740
 
1741
- type ConstraintKind = 'number' | 'boolean' | 'text' | 'select' | 'date'
1741
+ type ConstraintKind = 'text' | 'number' | 'date' | 'boolean' | 'select'
1742
1742
 
1743
1743
  type DashboardWidget = StatsWidget | ChartWidget | TableWidget
1744
1744
 
1745
- type EntryKind = 'text' | 'image' | 'color' | 'icon' | 'code' | 'keyValue' | 'repeatable'
1745
+ type EntryKind = 'text' | 'icon' | 'image' | 'color' | 'code' | 'keyValue' | 'repeatable'
1746
1746
 
1747
1747
  type EntrySize = 'sm' | 'base' | 'lg'
1748
1748
 
@@ -1754,13 +1754,13 @@ type FieldMode = 'create' | 'edit'
1754
1754
 
1755
1755
  type FieldPredicate = (data: Record<string, unknown>) => boolean
1756
1756
 
1757
- type FieldType = 'number' | 'text' | 'toggle' | 'select' | 'color' | 'builder' | 'date' | 'code' | 'keyValue' | 'datetime' | 'email' | 'password' | 'url' | 'tel' | 'textarea' | 'checkbox' | 'radio' | 'checkboxList' | 'time' | 'hidden' | 'tags' | 'file' | 'media' | 'slider' | 'toggleButtons' | 'markdown' | 'richText' | 'repeater' | 'custom'
1757
+ type FieldType = 'text' | 'email' | 'password' | 'number' | 'url' | 'tel' | 'textarea' | 'select' | 'checkbox' | 'toggle' | 'radio' | 'checkboxList' | 'date' | 'datetime' | 'time' | 'color' | 'hidden' | 'tags' | 'keyValue' | 'file' | 'media' | 'slider' | 'toggleButtons' | 'code' | 'markdown' | 'richText' | 'repeater' | 'builder' | 'custom'
1758
1758
 
1759
1759
  type FilterApply = (query: AdminQuery, value: string) => AdminQuery
1760
1760
 
1761
- type FilterType = 'text' | 'select' | 'ternary' | 'builder'
1761
+ type FilterType = 'select' | 'ternary' | 'builder' | 'text'
1762
1762
 
1763
- type FormBlock = { kind: 'section'; section: FormSection;} | { kind: 'tabs'; tabs: FormTabs;} | { kind: 'wizard'; wizard: Wizard;} | { kind: 'split'; split: FormSplit;} | { kind: 'callout'; callout: Callout;} | { kind: 'prime'; prime: Prime;}
1763
+ type FormBlock = { kind: 'section'; section: FormSection } | { kind: 'tabs'; tabs: FormTabs } | { kind: 'wizard'; wizard: Wizard } | { kind: 'split'; split: FormSplit } | { kind: 'callout'; callout: Callout } | { kind: 'prime'; prime: Prime }
1764
1764
 
1765
1765
  type FormComponent = FormSection | FormTabs | Wizard | FormSplit | Callout | Prime | Field
1766
1766
 
@@ -1768,11 +1768,11 @@ type InfolistComponent = Section | Entry
1768
1768
 
1769
1769
  type PanelPageClass = new () => object
1770
1770
 
1771
- type PrimeKind = 'text' | 'image' | 'html'
1771
+ type PrimeKind = 'text' | 'html' | 'image'
1772
1772
 
1773
1773
  type QueryModifier = (query: AdminQuery) => AdminQuery
1774
1774
 
1775
- type QueryRule = { type: 'rule'; constraint: string; operator: string; value?: string;} | { type: 'group'; operator: Conjunction; rules: QueryRule[];}
1775
+ type QueryRule = { type: 'rule'; constraint: string; operator: string; value?: string } | { type: 'group'; operator: Conjunction; rules: QueryRule[] }
1776
1776
 
1777
1777
  type RelationKind = 'hasMany' | 'belongsToMany'
1778
1778
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zerotal/admin",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "license": "MIT",
5
5
  "maturity": "stable",
6
6
  "private": false,
@@ -32,16 +32,16 @@
32
32
  "typecheck": "tsc --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@zerotal/cache": "1.7.2",
36
- "@zerotal/core": "1.7.2",
37
- "@zerotal/flow": "1.7.2",
38
- "@zerotal/flow-ui": "1.7.2",
39
- "@zerotal/validator": "1.7.2"
35
+ "@zerotal/cache": "1.7.4",
36
+ "@zerotal/core": "1.7.4",
37
+ "@zerotal/flow": "1.7.4",
38
+ "@zerotal/flow-ui": "1.7.4",
39
+ "@zerotal/validator": "1.7.4"
40
40
  },
41
41
  "devDependencies": {
42
- "@zerotal/orm": "1.7.2",
43
- "@zerotal/auth": "1.7.2",
44
- "@zerotal/queue": "1.7.2"
42
+ "@zerotal/orm": "1.7.4",
43
+ "@zerotal/auth": "1.7.4",
44
+ "@zerotal/queue": "1.7.4"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@zerotal/orm": "^1.0.0",