zova-module-a-layoutprofile 5.0.0 → 5.0.3
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/LICENSE +21 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/model/layoutprofile.d.ts.map +1 -1
- package/package.json +10 -6
- package/src/model/layoutprofile.ts +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016-present Cabloy/Vona/Zova
|
|
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.
|
package/dist/index.js
CHANGED
|
@@ -23,8 +23,7 @@ var ModelLayoutProfile = (_dec$3 = Model({ enableSelector: true }), _dec2$3 = Be
|
|
|
23
23
|
queryKey: ["load"],
|
|
24
24
|
queryFn: async () => {
|
|
25
25
|
return await this.scope.api.layoutprofile.load({ query: { layoutKey: this.layoutKey } });
|
|
26
|
-
}
|
|
27
|
-
meta: { disableErrorEffect: true }
|
|
26
|
+
}
|
|
28
27
|
});
|
|
29
28
|
}
|
|
30
29
|
save() {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/model/layoutprofile.ts","../src/api/openapi/baseURL.ts","../src/api/layoutprofile.ts","../src/apiSchema/layoutprofile.ts","../src/.metadata/index.ts"],"sourcesContent":["var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanModelBase, Model } from 'zova-module-a-model';\nexport let ModelLayoutProfile = (_dec = Model({\n enableSelector: true\n}), _dec2 = __z_BeanInfo({\n module: \"a-layoutprofile\"\n}), _dec(_class = _dec2(_class = class ModelLayoutProfile extends BeanModelBase {\n constructor(...args) {\n super(...args);\n this.layoutKey = void 0;\n }\n async __init__(layoutKey) {\n if (!layoutKey) throw new Error('layout key not specified');\n await super.__init__(layoutKey);\n this.layoutKey = layoutKey;\n }\n load() {\n if (this.$ssr.cookieDisabledOnServer || !this.$passport.isAuthenticated) return;\n if (process.env.CLIENT && this.$ssr.profile === 'public' && this.$ssr.isRuntimeSsrPreHydration) return;\n return this.$useStateData({\n queryKey: ['load'],\n queryFn: async () => {\n return await this.scope.api.layoutprofile.load({\n query: {\n layoutKey: this.layoutKey\n }\n });\n }
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/model/layoutprofile.ts","../src/api/openapi/baseURL.ts","../src/api/layoutprofile.ts","../src/apiSchema/layoutprofile.ts","../src/.metadata/index.ts"],"sourcesContent":["var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanModelBase, Model } from 'zova-module-a-model';\nexport let ModelLayoutProfile = (_dec = Model({\n enableSelector: true\n}), _dec2 = __z_BeanInfo({\n module: \"a-layoutprofile\"\n}), _dec(_class = _dec2(_class = class ModelLayoutProfile extends BeanModelBase {\n constructor(...args) {\n super(...args);\n this.layoutKey = void 0;\n }\n async __init__(layoutKey) {\n if (!layoutKey) throw new Error('layout key not specified');\n await super.__init__(layoutKey);\n this.layoutKey = layoutKey;\n }\n load() {\n if (this.$ssr.cookieDisabledOnServer || !this.$passport.isAuthenticated) return;\n if (process.env.CLIENT && this.$ssr.profile === 'public' && this.$ssr.isRuntimeSsrPreHydration) return;\n return this.$useStateData({\n queryKey: ['load'],\n queryFn: async () => {\n return await this.scope.api.layoutprofile.load({\n query: {\n layoutKey: this.layoutKey\n }\n });\n }\n });\n }\n save() {\n return this.$useMutationData({\n mutationKey: ['save'],\n mutationFn: async profile => {\n return await this.scope.api.layoutprofile.save({\n layoutKey: this.layoutKey,\n profile\n });\n },\n onSuccess: profile => {\n this.$setQueryData(['load'], profile);\n }\n });\n }\n reset() {\n return this.$useMutationData({\n mutationKey: ['reset'],\n mutationFn: async () => {\n return await this.scope.api.layoutprofile.reset({\n query: {\n layoutKey: this.layoutKey\n }\n });\n },\n onSuccess: async () => {\n this.$setQueryData(['load'], undefined);\n }\n });\n }\n}) || _class) || _class);","export const OpenApiBaseURL = sys => {\n return sys.util.getOpenApiBaseURL('OPENAPI_BASE_URL_A_LAYOUTPROFILE');\n};","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { Api, BeanApiBase } from 'zova-module-a-api';\nimport { OpenApiBaseURL } from './openapi/index.js';\n\n/** Layoutprofile_load */\nexport const ApiApiLayoutprofileloadPath = '/api/layoutprofile/load';\n/** Layoutprofile_save */\nexport const ApiApiLayoutprofilesavePath = '/api/layoutprofile/save';\n/** Layoutprofile_reset */\nexport const ApiApiLayoutprofileresetPath = '/api/layoutprofile/reset';\nexport let ApiLayoutprofile = (_dec = Api(), _dec2 = __z_BeanInfo({\n module: \"a-layoutprofile\"\n}), _dec(_class = _dec2(_class = class ApiLayoutprofile extends BeanApiBase {\n load(options) {\n return this.$fetch.get(ApiApiLayoutprofileloadPath, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n save(body, options) {\n return this.$fetch.post(ApiApiLayoutprofilesavePath, body, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n reset(options) {\n return this.$fetch.delete(ApiApiLayoutprofileresetPath, this.$configPrepare(OpenApiBaseURL(this.sys), options, true));\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase } from 'zova';\nimport { ApiSchema } from 'zova-module-a-api';\nimport { ApiApiLayoutprofileloadPath, ApiApiLayoutprofilesavePath, ApiApiLayoutprofileresetPath } from '../api/layoutprofile.js';\nexport let ApiSchemaLayoutprofile = (_dec = ApiSchema(), _dec2 = __z_BeanInfo({\n module: \"a-layoutprofile\"\n}), _dec(_class = _dec2(_class = class ApiSchemaLayoutprofile extends BeanBase {\n load(options) {\n return this.$sdk.createApiSchemas(ApiApiLayoutprofileloadPath, 'get', options);\n }\n save(options) {\n return this.$sdk.createApiSchemas(ApiApiLayoutprofilesavePath, 'post', options);\n }\n reset(options) {\n return this.$sdk.createApiSchemas(ApiApiLayoutprofileresetPath, 'delete', options);\n }\n}) || _class) || _class);","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** model: begin */\nexport * from '../model/layoutprofile.js';\nimport 'zova-module-a-model';\n/** model: end */\n/** model: begin */\n\nimport 'zova';\n/** model: end */\n/** api: begin */\nexport * from '../api/layoutprofile.js';\nimport 'zova';\n\n/** api: end */\n/** api: begin */\n\n/** api: end */\n/** api: begin */\n\nimport 'zova';\n/** api: end */\n/** openapi: begin */\nexport * from '../api/openapi/index.js';\n/** openapi: end */\n/** apiSchema: begin */\nexport * from '../apiSchema/layoutprofile.js';\nimport 'zova';\n\n/** apiSchema: end */\n/** apiSchema: begin */\n\n/** apiSchema: end */\n/** apiSchema: begin */\n\nimport 'zova';\n/** apiSchema: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleALayoutprofile = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-layoutprofile\"\n}), _dec(_class = _dec2(_class = class ScopeModuleALayoutprofile extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */"],"mappings":";;;;;AAAA,IAAI;AAAM,IAAA;AAAO,IAAA;AAGjB,IAAW,sBAAsB,SAAO,MAAM,EAC5C,gBAAgB,KAClB,CAAC,GAAG,UAAQ,SAAa,EACvB,QAAQ,kBACV,CAAC,GAAG,OAAK,WAAS,QAAM,WAAS,MAAM,2BAA2B,cAAc;CAC9E,YAAY,GAAG,MAAM;EACnB,MAAM,GAAG,IAAI;EACb,KAAK,YAAY,KAAK;CACxB;CACA,MAAM,SAAS,WAAW;EACxB,IAAI,CAAC,WAAW,MAAM,IAAI,MAAM,0BAA0B;EAC1D,MAAM,MAAM,SAAS,SAAS;EAC9B,KAAK,YAAY;CACnB;CACA,OAAO;EACL,IAAI,KAAK,KAAK,0BAA0B,CAAC,KAAK,UAAU,iBAAiB;EACzE,IAAI,QAAQ,IAAI,UAAU,KAAK,KAAK,YAAY,YAAY,KAAK,KAAK,0BAA0B;EAChG,OAAO,KAAK,cAAc;GACxB,UAAU,CAAC,MAAM;GACjB,SAAS,YAAY;IACnB,OAAO,MAAM,KAAK,MAAM,IAAI,cAAc,KAAK,EAC7C,OAAO,EACL,WAAW,KAAK,UAClB,EACF,CAAC;GACH;EACF,CAAC;CACH;CACA,OAAO;EACL,OAAO,KAAK,iBAAiB;GAC3B,aAAa,CAAC,MAAM;GACpB,YAAY,OAAM,YAAW;IAC3B,OAAO,MAAM,KAAK,MAAM,IAAI,cAAc,KAAK;KAC7C,WAAW,KAAK;KAChB;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,QAAM,WAAS,MAAM,+BAA+B,SAAS;CAC7E,KAAK,SAAS;EACZ,OAAO,KAAK,KAAK,iBAAA,2BAA8C,OAAO,OAAO;CAC/E;CACA,KAAK,SAAS;EACZ,OAAO,KAAK,KAAK,iBAAA,2BAA8C,QAAQ,OAAO;CAChF;CACA,MAAM,SAAS;EACb,OAAO,KAAK,KAAK,iBAAA,4BAA+C,UAAU,OAAO;CACnF;AACF,CAAC,KAAK,QAAM,KAAK;;;;;ACjBjB,IAAI;AAAM,IAAA;AAAO,IAAA;AAyCjB,IAAW,6BAA6B,OAAO,MAAM,GAAG,QAAQ,SAAa,EAC3E,QAAQ,kBACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,kCAAkC,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layoutprofile.d.ts","sourceRoot":"","sources":["../../src/model/layoutprofile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAS3D,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACxE,cAAc,EAAE,IAAI,CAAC;CACtB;AAED,qBAGa,kBAAmB,SAAQ,aAAa;IACnD,SAAS,EAAE,MAAM,CAAC;cAEF,QAAQ,CAAC,SAAS,EAAE,MAAM;IAM1C,IAAI;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"layoutprofile.d.ts","sourceRoot":"","sources":["../../src/model/layoutprofile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAS,MAAM,qBAAqB,CAAC;AAS3D,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACxE,cAAc,EAAE,IAAI,CAAC;CACtB;AAED,qBAGa,kBAAmB,SAAQ,aAAa;IACnD,SAAS,EAAE,MAAM,CAAC;cAEF,QAAQ,CAAC,SAAS,EAAE,MAAM;IAM1C,IAAI;;;;;;;;;IAcJ,IAAI;;;;;;;;;;;;;;;;;IAkBJ,KAAK;CAaN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zova-module-a-layoutprofile",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Zova Module"
|
|
@@ -22,10 +22,14 @@
|
|
|
22
22
|
},
|
|
23
23
|
"./*": "./*"
|
|
24
24
|
},
|
|
25
|
-
"dependencies": {},
|
|
26
|
-
"title": "a-layoutprofile",
|
|
27
25
|
"scripts": {
|
|
28
26
|
"clean": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
29
|
-
"tsc:publish": "npm run clean && node ../../../../../packages-cli/cli/src/bin/zova.ts :bin:buildModule --sourcemap && tsc -p tsconfig.build.json"
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
"tsc:publish": "npm run clean && node ../../../../../packages-cli/cli/src/bin/zova.ts :bin:buildModule --sourcemap && tsc -p tsconfig.build.json",
|
|
28
|
+
"prepublishOnly": "npm run tsc:publish",
|
|
29
|
+
"prepack": "clean-package",
|
|
30
|
+
"postpack": "clean-package restore"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {},
|
|
33
|
+
"title": "a-layoutprofile",
|
|
34
|
+
"gitHead": "b88abae0ef9cbe59388093d012c1193d5fa14175"
|
|
35
|
+
}
|