zova-module-a-behaviors 5.1.7 → 5.1.9
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"behavior.focus.d.ts","sourceRoot":"","sources":["../../src/bean/behavior.focus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAAE,gBAAgB,EAAY,MAAM,wBAAwB,CAAC;AAEpE,MAAM,WAAW,wBAAwB;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;CAAG;AAE9E,MAAM,WAAW,qBAAsB,SAAQ,yBAAyB;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,qBACa,aAAc,SAAQ,gBAAgB,
|
|
1
|
+
{"version":3,"file":"behavior.focus.d.ts","sourceRoot":"","sources":["../../src/bean/behavior.focus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,KAAK,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAAE,gBAAgB,EAAY,MAAM,wBAAwB,CAAC;AAEpE,MAAM,WAAW,wBAAwB;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;CAAG;AAE9E,MAAM,WAAW,qBAAsB,SAAQ,yBAAyB;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,qBACa,aAAc,SAAQ,gBAAgB,CACjD,qBAAqB,EACrB,wBAAwB,EACxB,yBAAyB,CAC1B;IACC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB,SAAS,CAAC,MAAM,CACd,KAAK,EAAE,wBAAwB,EAC/B,IAAI,EAAE,YAAY,CAAC,yBAAyB,CAAC,GAC5C,KAAK;CAcT"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/bean/behavior.focus.ts","../src/.metadata/index.ts"],"sourcesContent":["import type { VNode } from 'vue';\nimport type { IDecoratorBehaviorOptions, NextBehavior } from 'zova-module-a-behavior';\n\nimport { BeanBehaviorBase, Behavior } from 'zova-module-a-behavior';\n\nexport interface IBehaviorPropsInputFocus {\n ref?: any;\n}\n\nexport interface IBehaviorPropsOutputFocus extends IBehaviorPropsInputFocus {}\n\nexport interface IBehaviorOptionsFocus extends IDecoratorBehaviorOptions {\n always?: boolean;\n}\n\n@Behavior<IBehaviorOptionsFocus>()\nexport class BehaviorFocus extends BeanBehaviorBase
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/bean/behavior.focus.ts","../src/.metadata/index.ts"],"sourcesContent":["import type { VNode } from 'vue';\nimport type { IDecoratorBehaviorOptions, NextBehavior } from 'zova-module-a-behavior';\n\nimport { BeanBehaviorBase, Behavior } from 'zova-module-a-behavior';\n\nexport interface IBehaviorPropsInputFocus {\n ref?: any;\n}\n\nexport interface IBehaviorPropsOutputFocus extends IBehaviorPropsInputFocus {}\n\nexport interface IBehaviorOptionsFocus extends IDecoratorBehaviorOptions {\n always?: boolean;\n}\n\n@Behavior<IBehaviorOptionsFocus>()\nexport class BehaviorFocus extends BeanBehaviorBase<\n IBehaviorOptionsFocus,\n IBehaviorPropsInputFocus,\n IBehaviorPropsOutputFocus\n> {\n inputRef?: HTMLElement;\n\n protected render(\n props: IBehaviorPropsInputFocus,\n next: NextBehavior<IBehaviorPropsOutputFocus>,\n ): VNode {\n const refOuter = props?.ref;\n props = {\n ...props,\n ref: (ref: HTMLElement) => {\n if (this.$options.always || !this.inputRef) {\n ref.focus?.();\n }\n this.inputRef = ref;\n refOuter?.(ref);\n },\n };\n return next(props);\n }\n}\n","// eslint-disable\n/** behavior: begin */\nexport * from '../bean/behavior.focus.js';\nimport { IBehaviorOptionsFocus } from '../bean/behavior.focus.js';\nimport 'zova-module-a-behavior';\ndeclare module 'zova-module-a-behavior' {\n \n export interface IBehaviorRecord {\n 'a-behaviors:focus': IBehaviorOptionsFocus;\n }\n\n \n}\ndeclare module 'zova-module-a-behaviors' {\n \n export interface BehaviorFocus {\n /** @internal */\n get scope(): ScopeModuleABehaviors;\n }\n\n export interface BehaviorFocus {\n get $beanFullName(): 'a-behaviors.behavior.focus';\n get $onionName(): 'a-behaviors:focus';\n get $onionOptions(): IBehaviorOptionsFocus;\n } \n}\n/** behavior: end */\n/** behavior: begin */\nimport { BehaviorFocus } from '../bean/behavior.focus.js';\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanRecordLocal {\n 'a-behaviors.behavior.focus': BehaviorFocus;\n }\n}\n/** behavior: end */\n/** behaviors: begin */\nimport 'vue';\nimport 'vue/jsx-runtime';\n\ndeclare module 'vue' {\n export interface InputHTMLAttributes {\n 'bs-behaviors-focus'?: IBehaviorOptionsFocus | '' | boolean;\n }\n}\n\ndeclare module 'vue/jsx-runtime' {\n namespace JSX {\n // need define class/style in IntrinsicAttributes\n export interface IntrinsicAttributes {\n 'bs-behaviors-focus'?: IBehaviorOptionsFocus | '' | boolean;\n }\n }\n}\n/** behaviors: end */\n/** scope: begin */\nimport { BeanScopeBase, type BeanScopeUtil } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\n\n@Scope()\nexport class ScopeModuleABehaviors extends BeanScopeBase {}\n\nexport interface ScopeModuleABehaviors {\n util: BeanScopeUtil;\n}\n\nimport 'zova';\ndeclare module 'zova' {\n export interface IBeanScopeRecord {\n 'a-behaviors': ScopeModuleABehaviors;\n }\n \n \n\n \n\n \n}\n \n/** scope: end */\n"],"mappings":";;;;;;AAAA,IAAA,QAAO,SAAO;AAGd,IAAS,iBAAkB,SAAQ,UAAS,EAAA,UAAW,SAAY,EAAA,QAAA,eAEnE,CAAA,EAAA,OAAO,WAAU,QAAA,WAAA,MAAA,sBAAyB,iBAAA;CACxC,YAAS,GAAA,MAAA;AACX,QAAA,GAAA,KAAA;;;;EAIA,MAAO,WAAU,OAAA;AACf,UAAS;GACX,GAAA;;AAEC,QAAS,KAAA,SAAA,UAAuB,CAAA,KAAA,SAC1B,KAAM,SAAA;AAEX,SAAA,WAAA;AACA,eAAA,IAAA;;GAEA;;;EAGA,IAAE,SAAO,IAAA;;;;;ACxBX,IAAG,MAAO,OAAA;AAkBV,IAAQ,yBAAA,OAAA,OAAA,EAAA,QAAA,SAAA,EAAA,QAAA,eAEP,CAAC,EAAE,KAAI,SAAO,MAAS,SAAC,MAAc,8BAAA,cAAA,GAAA,IAAA,OAAA,IAAA"}
|
package/package.json
CHANGED
|
@@ -14,10 +14,17 @@ export interface IBehaviorOptionsFocus extends IDecoratorBehaviorOptions {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@Behavior<IBehaviorOptionsFocus>()
|
|
17
|
-
export class BehaviorFocus extends BeanBehaviorBase<
|
|
17
|
+
export class BehaviorFocus extends BeanBehaviorBase<
|
|
18
|
+
IBehaviorOptionsFocus,
|
|
19
|
+
IBehaviorPropsInputFocus,
|
|
20
|
+
IBehaviorPropsOutputFocus
|
|
21
|
+
> {
|
|
18
22
|
inputRef?: HTMLElement;
|
|
19
23
|
|
|
20
|
-
protected render(
|
|
24
|
+
protected render(
|
|
25
|
+
props: IBehaviorPropsInputFocus,
|
|
26
|
+
next: NextBehavior<IBehaviorPropsOutputFocus>,
|
|
27
|
+
): VNode {
|
|
21
28
|
const refOuter = props?.ref;
|
|
22
29
|
props = {
|
|
23
30
|
...props,
|