native-document 1.0.77 → 1.0.79
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/dist/native-document.components.min.js +146 -120
- package/dist/native-document.dev.js +171 -125
- package/dist/native-document.dev.js.map +1 -1
- package/dist/native-document.devtools.min.js +1 -1
- package/dist/native-document.min.js +1 -1
- package/package.json +1 -1
- package/rollup.config.js +0 -16
- package/src/components/$traits/HasItems.js +1 -1
- package/src/components/accordion/Accordion.js +2 -2
- package/src/components/accordion/AccordionItem.js +2 -2
- package/src/components/alert/Alert.js +2 -2
- package/src/components/avatar/Avatar.js +2 -2
- package/src/components/badge/Badge.js +2 -2
- package/src/components/breadcrumb/BreadCrumb.js +2 -2
- package/src/components/button/Button.js +2 -2
- package/src/components/card/Card.js +1 -1
- package/src/components/context-menu/ContextMenu.js +2 -2
- package/src/components/context-menu/ContextMenuGroup.js +1 -1
- package/src/components/context-menu/ContextMenuItem.js +1 -1
- package/src/components/divider/Divider.js +1 -1
- package/src/components/dropdown/Dropdown.js +2 -2
- package/src/components/dropdown/DropdownDivider.js +1 -1
- package/src/components/dropdown/DropdownGroup.js +1 -1
- package/src/components/dropdown/DropdownItem.js +1 -1
- package/src/components/dropdown/DropdownTrigger.js +1 -1
- package/src/components/form/FormControl.js +5 -5
- package/src/components/form/field/DefaultRender.js +2 -2
- package/src/components/form/field/Field.js +4 -4
- package/src/components/form/field/FieldCollection.js +5 -5
- package/src/components/form/field/types/CheckboxField.js +1 -1
- package/src/components/form/field/types/ColorField.js +1 -1
- package/src/components/form/field/types/DateField.js +1 -1
- package/src/components/form/field/types/EmailField.js +1 -1
- package/src/components/form/field/types/FileField.js +1 -1
- package/src/components/form/field/types/ImageField.js +1 -1
- package/src/components/form/field/types/NumberField.js +1 -1
- package/src/components/form/field/types/PasswordField.js +1 -1
- package/src/components/form/field/types/RadioField.js +1 -1
- package/src/components/form/field/types/StringField.js +1 -1
- package/src/components/form/field/types/TelField.js +1 -1
- package/src/components/form/field/types/TimeField.js +1 -1
- package/src/components/form/field/types/UrlField.js +1 -1
- package/src/components/form/validation/Validation.js +1 -1
- package/src/components/list/List.js +4 -4
- package/src/components/list/ListGroup.js +2 -2
- package/src/components/list/ListItem.js +2 -2
- package/src/components/menu/Menu.js +3 -3
- package/src/components/menu/MenuDivider.js +1 -1
- package/src/components/menu/MenuGroup.js +2 -2
- package/src/components/menu/MenuItem.js +2 -2
- package/src/components/modal/Modal.js +2 -2
- package/src/components/pagination/Pagination.js +2 -2
- package/src/components/popover/Popover.js +2 -2
- package/src/components/popover/PopoverFooter.js +1 -1
- package/src/components/popover/PopoverHeader.js +1 -1
- package/src/components/progress/Progress.js +3 -3
- package/src/components/slider/Slider.js +2 -2
- package/src/components/splitter/Splitter.js +3 -4
- package/src/components/splitter/SplitterPanel.js +1 -1
- package/src/components/stepper/Stepper.js +3 -3
- package/src/components/stepper/StepperStep.js +2 -2
- package/src/components/switch/Switch.js +2 -2
- package/src/components/table/ColumnGroup.js +1 -1
- package/src/components/table/DataTable.js +1 -1
- package/src/components/table/SimpleTable.js +1 -1
- package/src/components/tabs/Tabs.js +2 -2
- package/src/components/toast/Toast.js +2 -2
- package/src/components/tooltip/prototypes.js +1 -1
- package/src/core/data/MemoryManager.js +1 -2
- package/src/core/data/Observable.js +1 -1
- package/src/core/data/ObservableArray.js +4 -4
- package/src/core/data/ObservableItem.js +5 -5
- package/src/core/data/observable-helpers/array.js +2 -2
- package/src/core/data/observable-helpers/batch.js +2 -2
- package/src/core/data/observable-helpers/computed.js +6 -6
- package/src/core/data/observable-helpers/object.js +2 -2
- package/src/core/elements/anchor.js +3 -3
- package/src/core/elements/content-formatter.js +1 -1
- package/src/core/elements/control/for-each-array.js +5 -6
- package/src/core/elements/control/for-each.js +7 -7
- package/src/core/elements/control/show-if.js +5 -5
- package/src/core/elements/control/show-when.js +2 -2
- package/src/core/elements/control/switch.js +4 -4
- package/src/core/elements/description-list.js +1 -1
- package/src/core/elements/form.js +1 -1
- package/src/core/elements/html5-semantics.js +1 -1
- package/src/core/elements/img.js +3 -3
- package/src/core/elements/index.js +1 -1
- package/src/core/elements/interactive.js +1 -1
- package/src/core/elements/list.js +1 -1
- package/src/core/elements/medias.js +1 -1
- package/src/core/elements/meta-data.js +1 -1
- package/src/core/elements/table.js +1 -1
- package/src/core/utils/EventEmitter.js +1 -1
- package/src/core/utils/args-types.js +2 -2
- package/src/core/utils/filters/standard.js +1 -1
- package/src/core/utils/filters/utils.js +1 -1
- package/src/core/utils/prototypes.js +2 -2
- package/src/core/utils/validator.js +5 -5
- package/src/core/wrappers/AttributesWrapper.js +3 -3
- package/src/core/wrappers/DocumentObserver.js +0 -1
- package/src/core/wrappers/ElementCreator.js +3 -3
- package/src/core/wrappers/HtmlElementWrapper.js +2 -2
- package/src/core/wrappers/NDElement.js +3 -3
- package/src/core/wrappers/NdPrototype.js +1 -1
- package/src/core/wrappers/SingletonView.js +1 -1
- package/src/core/wrappers/TemplateCloner.js +1 -2
- package/src/core/wrappers/prototypes/attributes-extensions.js +4 -4
- package/src/core/wrappers/prototypes/bind-class-extensions.js +4 -4
- package/src/core/wrappers/prototypes/nd-element-extensions.js +6 -6
- package/src/devtools/app/App.js +2 -2
- package/src/devtools/hrm/ComponentRegistry.js +2 -2
- package/src/devtools/plugin.js +1 -1
- package/src/devtools/widget/DevToolsWidget.js +2 -2
- package/src/router/Route.js +1 -1
- package/src/router/RouteGroupHelper.js +1 -1
- package/src/router/Router.js +4 -4
- package/src/router/RouterComponent.js +1 -1
- package/src/router/link.js +4 -4
- package/src/router/modes/HistoryRouter.js +1 -1
- package/types/control-flow.d.ts +0 -1
- package/types/filters/dates.d.ts +1 -1
- package/types/filters/types.d.ts +1 -1
- package/utils.js +3 -3
- package/jsconfig.json +0 -15
- /package/src/{core → router}/errors/RouterError.js +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import Anchor from "
|
|
2
|
-
import {Observable} from "
|
|
3
|
-
import Validator from "
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import NativeDocumentError from "@src/core/errors/NativeDocumentError";
|
|
1
|
+
import Anchor from "../../elements/anchor";
|
|
2
|
+
import {Observable} from "../../data/Observable";
|
|
3
|
+
import Validator from "../../utils/validator";
|
|
4
|
+
import { ElementCreator } from "../../wrappers/ElementCreator";
|
|
5
|
+
import NativeDocumentError from "../../errors/NativeDocumentError";
|
|
7
6
|
|
|
8
7
|
export function ForEachArray(data, callback, configs = {}) {
|
|
9
8
|
const element = Anchor('ForEach Array');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {Observable} from "
|
|
2
|
-
import Validator from "
|
|
3
|
-
import Anchor from "
|
|
4
|
-
import DebugManager from "
|
|
5
|
-
import {getKey} from "
|
|
6
|
-
import { ElementCreator } from "
|
|
7
|
-
import NativeDocumentError from "
|
|
1
|
+
import {Observable} from "../../data/Observable";
|
|
2
|
+
import Validator from "../../utils/validator";
|
|
3
|
+
import Anchor from "../../elements/anchor";
|
|
4
|
+
import DebugManager from "../../utils/debug-manager";
|
|
5
|
+
import {getKey} from "../../utils/helpers";
|
|
6
|
+
import { ElementCreator } from "../../wrappers/ElementCreator";
|
|
7
|
+
import NativeDocumentError from "../../errors/NativeDocumentError";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Observable } from "
|
|
2
|
-
import Validator from "
|
|
3
|
-
import DebugManager from "
|
|
4
|
-
import Anchor from "
|
|
5
|
-
import {ElementCreator} from "
|
|
1
|
+
import { Observable } from "../../data/Observable";
|
|
2
|
+
import Validator from "../../utils/validator";
|
|
3
|
+
import DebugManager from "../../utils/debug-manager.js";
|
|
4
|
+
import Anchor from "../../elements/anchor";
|
|
5
|
+
import {ElementCreator} from "../../wrappers/ElementCreator";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Show the element if the condition is true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Validator from "
|
|
2
|
-
import NativeDocumentError from "
|
|
1
|
+
import Validator from "../../utils/validator.js";
|
|
2
|
+
import NativeDocumentError from "../../errors/NativeDocumentError.js";
|
|
3
3
|
import {ShowIf} from "./show-if.js";
|
|
4
4
|
|
|
5
5
|
export const ShowWhen = function() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import NativeDocumentError from "
|
|
2
|
-
import Validator from "
|
|
3
|
-
import Anchor from "
|
|
4
|
-
import {ElementCreator} from "
|
|
1
|
+
import NativeDocumentError from "../../errors/NativeDocumentError";
|
|
2
|
+
import Validator from "../../utils/validator";
|
|
3
|
+
import Anchor from "../../elements/anchor";
|
|
4
|
+
import {ElementCreator} from "../../wrappers/ElementCreator";
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
package/src/core/elements/img.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import HtmlElementWrapper from "
|
|
2
|
-
import Validator from "
|
|
3
|
-
import NativeDocumentError from "
|
|
1
|
+
import HtmlElementWrapper from "../wrappers/HtmlElementWrapper"
|
|
2
|
+
import Validator from "../utils/validator";
|
|
3
|
+
import NativeDocumentError from "../errors/NativeDocumentError";
|
|
4
4
|
|
|
5
5
|
export const BaseImage = HtmlElementWrapper('img');
|
|
6
6
|
export const Img = function(src, attributes) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Validator from "./validator";
|
|
2
|
-
import ArgTypesError from "
|
|
3
|
-
import NativeDocumentError from "
|
|
2
|
+
import ArgTypesError from "../errors/ArgTypesError";
|
|
3
|
+
import NativeDocumentError from "../errors/NativeDocumentError";
|
|
4
4
|
|
|
5
5
|
let withValidation = (fn) => fn;
|
|
6
6
|
let ArgTypes = {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {withValidation} from "./args-types.js";
|
|
2
|
-
import {Observable} from "
|
|
2
|
+
import {Observable} from "../data/Observable";
|
|
3
3
|
import Validator from "./validator";
|
|
4
|
-
import {NDElement} from "
|
|
4
|
+
import {NDElement} from "../wrappers/NDElement";
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Function.prototype.args = function(...args) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import ObservableItem from "
|
|
1
|
+
import ObservableItem from "../data/ObservableItem";
|
|
2
2
|
import DebugManager from "./debug-manager";
|
|
3
|
-
import NativeDocumentError from "
|
|
4
|
-
import ObservableChecker from "
|
|
5
|
-
import {NDElement} from "
|
|
6
|
-
import TemplateBinding from "
|
|
3
|
+
import NativeDocumentError from "../errors/NativeDocumentError";
|
|
4
|
+
import ObservableChecker from "../data/ObservableChecker";
|
|
5
|
+
import {NDElement} from "../wrappers/NDElement";
|
|
6
|
+
import TemplateBinding from "../wrappers/TemplateBinding";
|
|
7
7
|
|
|
8
8
|
const COMMON_NODE_TYPES = {
|
|
9
9
|
ELEMENT: 1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Validator from "
|
|
2
|
-
import NativeDocumentError from "
|
|
1
|
+
import Validator from "../utils/validator";
|
|
2
|
+
import NativeDocumentError from "../errors/NativeDocumentError";
|
|
3
3
|
import {BOOLEAN_ATTRIBUTES} from "./constants.js";
|
|
4
|
-
import {Observable} from "
|
|
4
|
+
import {Observable} from "../data/Observable";
|
|
5
5
|
import './prototypes/bind-class-extensions';
|
|
6
6
|
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Anchor from "
|
|
2
|
-
import Validator from "
|
|
1
|
+
import Anchor from "../elements/anchor";
|
|
2
|
+
import Validator from "../utils/validator";
|
|
3
3
|
import AttributesWrapper from "./AttributesWrapper";
|
|
4
|
-
import PluginsManager from "
|
|
4
|
+
import PluginsManager from "../utils/plugins-manager";
|
|
5
5
|
import './prototypes/nd-element-extensions';
|
|
6
6
|
import './prototypes/attributes-extensions';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Validator from "
|
|
1
|
+
import Validator from "../utils/validator";
|
|
2
2
|
import {ElementCreator} from "./ElementCreator";
|
|
3
3
|
import './NdPrototype';
|
|
4
|
-
import {normalizeComponentArgs} from "
|
|
4
|
+
import {normalizeComponentArgs} from "../utils/args-types";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DocumentObserver from "./DocumentObserver";
|
|
2
|
-
import PluginsManager from "
|
|
3
|
-
import NativeDocumentError from "
|
|
4
|
-
import DebugManager from "
|
|
2
|
+
import PluginsManager from "../utils/plugins-manager";
|
|
3
|
+
import NativeDocumentError from "../errors/NativeDocumentError.js";
|
|
4
|
+
import DebugManager from "../utils/debug-manager.js";
|
|
5
5
|
|
|
6
6
|
export function NDElement(element) {
|
|
7
7
|
this.$element = element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {bindAttributeWithObservable, bindBooleanAttribute} from "
|
|
2
|
-
import ObservableItem from "
|
|
3
|
-
import TemplateBinding from "
|
|
4
|
-
import {BOOLEAN_ATTRIBUTES} from "
|
|
1
|
+
import {bindAttributeWithObservable, bindBooleanAttribute} from "../AttributesWrapper";
|
|
2
|
+
import ObservableItem from "../../data/ObservableItem";
|
|
3
|
+
import TemplateBinding from "../TemplateBinding";
|
|
4
|
+
import {BOOLEAN_ATTRIBUTES} from "../constants";
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
String.prototype.handleNdAttribute = function(element, attributeName) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ObservableItem from "
|
|
2
|
-
import {toggleElementClass} from "
|
|
3
|
-
import {ObservableWhen} from "
|
|
4
|
-
import TemplateBinding from "
|
|
1
|
+
import ObservableItem from "../../../core/data/ObservableItem";
|
|
2
|
+
import {toggleElementClass} from "../AttributesWrapper";
|
|
3
|
+
import {ObservableWhen} from "../../data/ObservableWhen";
|
|
4
|
+
import TemplateBinding from "../../../core/wrappers/TemplateBinding";
|
|
5
5
|
|
|
6
6
|
ObservableItem.prototype.bindNdClass = function(element, className) {
|
|
7
7
|
element.classes.toggle(className, this.val());
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import ObservableItem from "
|
|
2
|
-
import {NDElement} from "
|
|
3
|
-
import TemplateBinding from "
|
|
4
|
-
import {ElementCreator} from "
|
|
5
|
-
import PluginsManager from "
|
|
6
|
-
import Validator from "
|
|
1
|
+
import ObservableItem from "../../data/ObservableItem";
|
|
2
|
+
import {NDElement} from "../NDElement";
|
|
3
|
+
import TemplateBinding from "../TemplateBinding";
|
|
4
|
+
import {ElementCreator} from "../ElementCreator";
|
|
5
|
+
import PluginsManager from "../../utils/plugins-manager";
|
|
6
|
+
import Validator from "../../utils/validator";
|
|
7
7
|
|
|
8
8
|
String.prototype.toNdElement = function () {
|
|
9
9
|
const formattedChild = this.resolveObservableTemplate ? this.resolveObservableTemplate() : this;
|
package/src/devtools/app/App.js
CHANGED
package/src/devtools/plugin.js
CHANGED
package/src/router/Route.js
CHANGED
package/src/router/Router.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {Route} from "./Route.js";
|
|
2
|
-
import Validator from "
|
|
3
|
-
import RouterError from "
|
|
2
|
+
import Validator from "../core/utils/validator.js";
|
|
3
|
+
import RouterError from "./errors/RouterError.js";
|
|
4
4
|
import {RouteGroupHelper} from "./RouteGroupHelper.js";
|
|
5
|
-
import {trim} from "
|
|
5
|
+
import {trim} from "../core/utils/helpers.js";
|
|
6
6
|
import HashRouter from "./modes/HashRouter.js";
|
|
7
7
|
import HistoryRouter from "./modes/HistoryRouter.js";
|
|
8
8
|
import MemoryRouter from "./modes/MemoryRouter.js";
|
|
9
|
-
import DebugManager from "
|
|
9
|
+
import DebugManager from "../core/utils/debug-manager.js";
|
|
10
10
|
import {RouterComponent} from "./RouterComponent.js";
|
|
11
11
|
|
|
12
12
|
export const DEFAULT_ROUTER_NAME = 'default';
|
package/src/router/link.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Validator from "
|
|
2
|
-
import {Link as NativeLink} from "
|
|
3
|
-
import Router, {DEFAULT_ROUTER_NAME} from "./Router
|
|
4
|
-
import RouterError from "
|
|
1
|
+
import Validator from "../core/utils/validator";
|
|
2
|
+
import {Link as NativeLink} from "../../elements";
|
|
3
|
+
import Router, {DEFAULT_ROUTER_NAME} from "./Router";
|
|
4
|
+
import RouterError from "./errors/RouterError";
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export function Link(options, children){
|
package/types/control-flow.d.ts
CHANGED
|
@@ -37,7 +37,6 @@ export interface ForEachFunction {
|
|
|
37
37
|
export interface ForEachArrayFunction {
|
|
38
38
|
<T>(data: ObservableArray<T>,
|
|
39
39
|
callback: (item: T, index?: ObservableItem<number>) => ValidChild,
|
|
40
|
-
key?: string | ((item: T, defaultKey: number) => string),
|
|
41
40
|
configs?: { pushDelay?: (items: T[]) => number, isParentUniqueChild: boolean, shouldKeepItemsInCache?: boolean }): DocumentFragment;
|
|
42
41
|
}
|
|
43
42
|
|
package/types/filters/dates.d.ts
CHANGED
package/types/filters/types.d.ts
CHANGED
package/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import NativeFetch from "
|
|
2
|
-
import { Service } from "
|
|
3
|
-
import * as Filters from "
|
|
1
|
+
import NativeFetch from "./src/fetch/NativeFetch";
|
|
2
|
+
import { Service } from "./src/core/utils/service";
|
|
3
|
+
import * as Filters from "./src/core/utils/filters/index";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
export {
|
package/jsconfig.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"baseUrl": ".",
|
|
4
|
-
"paths": {
|
|
5
|
-
"@/*": ["src/*"],
|
|
6
|
-
"@src/*": ["src/*"],
|
|
7
|
-
"@root/*": ["src/*"],
|
|
8
|
-
"@components/*": ["src/components/*"],
|
|
9
|
-
"@devtools/*": ["src/devtools/*"],
|
|
10
|
-
"@core": ["index"],
|
|
11
|
-
"@elements": ["elements"]
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"exclude": ["node_modules", "dist"]
|
|
15
|
-
}
|
|
File without changes
|