native-document 1.0.180 → 1.0.181

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "native-document",
3
- "version": "1.0.180",
3
+ "version": "1.0.181",
4
4
  "description": "A reactive JavaScript framework that preserves native DOM simplicity without sacrificing modern features",
5
5
  "author": "AfroCodeur <https://github.com/afrocodeur>",
6
6
  "license": "MIT",
@@ -56,7 +56,7 @@ export interface FormControlInterface extends BaseComponent {
56
56
  export declare function FormControl(props?: Record<string, unknown>): FormControlInterface;
57
57
  export declare namespace FormControl {
58
58
 
59
-
59
+ function setDefaultErrorsMapper(mapper: (error: Error) => Record<string, string|[]>): void;
60
60
  function use(template: (description: FormControlDescription, instance: FormControlInterface) => ValidChild): void;
61
61
  function create(props?: Record<string, unknown>): FormControlInterface;
62
62
 
@@ -71,6 +71,15 @@ export default function Router($options = {}) {
71
71
  return this;
72
72
  };
73
73
 
74
+ /**
75
+ * @param {Function} page
76
+ */
77
+ this.notFound = function(page) {
78
+ this.add('{path}', page, {
79
+ with: { path: '(.*)' },
80
+ });
81
+ };
82
+
74
83
  /**
75
84
  * Groups routes under a common path prefix with shared options.
76
85
  *
@@ -4,6 +4,8 @@ import {Dropdown} from '../../../../components/dropdown';
4
4
  import {buildErrors} from '../helpers';
5
5
  import DebugManager from '../../../../core/utils/debug-manager';
6
6
 
7
+ import './select-field.css';
8
+
7
9
  export default function SelectFieldRender($desc, instance) {
8
10
  const props = instance.getEditableProps();
9
11
 
@@ -0,0 +1,6 @@
1
+ .is-select-field {
2
+ .dropdown-items {
3
+ max-height: 350px;
4
+ overflow-y: auto;
5
+ }
6
+ }
package/types/router.d.ts CHANGED
@@ -46,6 +46,7 @@ export interface Router {
46
46
  with?: Record<string, string>;
47
47
  layout?: (children: ValidChild) => ValidChild ;
48
48
  }): this;
49
+ notFound(page: (context: RouteContext) => HTMLElement | DocumentFragment): void;
49
50
 
50
51
  group(suffix: string, options: { middlewares?: Function[]; name?: string; layout?: Function }, callback: () => void): this;
51
52